/* Same design tokens as wiski.pro */
:root {
  --bg: #0a0e18;
  --bg-alt: #0f1526;
  --surface: #131a2e;
  --surface-2: #1a2340;
  --text: #eef1f8;
  --text-muted: #aab4d0;
  --primary: #4fb0ff;
  --primary-2: #7c5cff;
  --accent: #ff8a3d;
  --success: #37d399;
  --danger: #ff6b7a;
  --border: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.16);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-width: none; overflow-x: hidden; }
html::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 110px;
}
h1, h2 { font-family: 'Poppins', sans-serif; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(79,176,255,0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.icon { width: 1em; height: 1em; flex-shrink: 0; }

.container { max-width: 640px; margin: 0 auto; padding: 0 24px; }

.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,176,255,0.10) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}

/* Hero */
.page-hero { position: relative; padding: 110px 0 40px; overflow: hidden; }
.page-hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(79,176,255,0.16), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(124,92,255,0.14), transparent 50%),
    var(--bg);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
  animation: bgDrift 16s ease-in-out infinite alternate;
}
@keyframes bgDrift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.1) translate(-2%, 2%); }
}
.page-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--primary); font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; font-size: 0.8rem; margin-bottom: 14px;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; letter-spacing: -1px; margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-lead { color: var(--text-muted); font-size: 1.05rem; }

/* Panels */
main > section { position: relative; padding: 16px 0; }
.panel {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  animation: rise 0.6s cubic-bezier(0, 0, 0.2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* Fields */
input, select {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
input:focus, select:focus { outline: none; border-color: var(--primary); }
input::placeholder { color: var(--text-muted); }
select { appearance: none; cursor: pointer; }

/* Optional settings */
.options-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }
.option {
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}
.option:has(input[type="checkbox"]:checked) { border-color: rgba(79,176,255,0.5); }
.option-head { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.option-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.option-head strong { display: block; font-size: 0.92rem; line-height: 1.4; }
.option-head small { display: block; color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; }
.option-text { flex: 1; }
.option-body { margin-top: 12px; }

.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  transition: background 0.2s ease;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}
.switch input:checked + i { background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 100px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 0.95rem; color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff; box-shadow: 0 10px 30px rgba(79,176,255,0.25);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(79,176,255,0.35); }
.btn-outline { background: transparent; border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }

.form-note { min-height: 1.2em; font-size: 0.9rem; color: var(--danger); }

/* Result */
.result-row { display: flex; gap: 10px; }
.result-row input { font-weight: 600; color: var(--primary); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(79,176,255,0.12); color: var(--primary);
  font-size: 0.78rem; font-weight: 600;
}
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Status pages (unlock / lien) */
.center-panel { text-align: center; align-items: center; }
.center-panel .option-icon { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 16px; }
.center-panel h1 { font-size: 1.5rem; }
.center-panel p { color: var(--text-muted); }
.center-panel form { width: 100%; display: flex; flex-direction: column; gap: 14px; }

/* Floating dock, as on wiski.pro */
.dock {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: 4px; padding: 7px; border-radius: 100px;
  background: rgba(19,26,46,0.72);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.dock-logo { width: 38px; height: 38px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.dock-logo:hover { transform: rotate(-12deg) scale(1.08); }
.dock-logo img { width: 100%; height: 100%; display: block; }
.dock-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--border-strong); }
.dock-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 100px;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 500; white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.dock-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.dock-link.active { color: #fff; background: linear-gradient(135deg, rgba(79,176,255,0.9), rgba(124,92,255,0.9)); }

@media (max-width: 520px) {
  .page-hero { padding-top: 80px; }
  .panel { padding: 18px; }
  .result-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.hint { color: var(--text-muted); font-size: 0.88rem; }
.link { color: var(--primary); text-decoration: underline; }
#list { margin-top: 8px; }

/* "Mes sondages": one panel per poll */
.stack { display: flex; flex-direction: column; gap: 16px; }

/* « Se connecter avec wiski.pro » : même bouton sur tous les sites (blanc, comme celui de Google) */
.wiski-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px; border-radius: 100px; border: 1px solid #dadce0;
  background: #fff; color: #1f1f1f; font: 600 0.92rem/1.2 'Inter', sans-serif;
  text-decoration: none; cursor: pointer; transition: background 0.2s ease;
}
.wiski-btn:hover { background: #f1f3f4; }
.wiski-btn img { width: 22px; height: 22px; border-radius: 6px; }
.account-bar { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.account-bar:empty { display: none; }


/* Form : création (listes de choix) */
.choice-row { display: flex; gap: 8px; align-items: center; }
.choice-row .btn-icon { flex-shrink: 0; }
.btn-icon {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 1.05rem; transition: color 0.2s ease, background 0.2s ease;
}
.btn-icon:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.add-choice { align-self: flex-start; }

/* Form : réponses (choix, barres de résultats) */
.poll-question { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 700; line-height: 1.3; word-break: break-word; }
.ballot { display: flex; flex-direction: column; gap: 10px; }
.ballot label {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease; word-break: break-word;
}
.ballot label:hover { border-color: var(--border-strong); }
.ballot label:has(input:checked) { border-color: var(--primary); background: rgba(79,176,255,0.08); }
.ballot input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--primary); padding: 0; }
.results { display: flex; flex-direction: column; gap: 12px; }
.result { position: relative; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-alt); border: 1px solid var(--border); overflow: hidden; }
.result-bar {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, rgba(79,176,255,0.22), rgba(124,92,255,0.22));
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.result.top .result-bar { background: linear-gradient(90deg, rgba(79,176,255,0.4), rgba(124,92,255,0.4)); }
.result-line { position: relative; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.result-label { font-weight: 600; word-break: break-word; display: inline-flex; align-items: center; gap: 8px; }
.result-label .icon { color: var(--success); }
.result-pct { font-family: 'Poppins', sans-serif; font-weight: 700; white-space: nowrap; }
.result-pct small { font-family: 'Inter', sans-serif; font-weight: 500; color: var(--text-muted); font-size: 0.8rem; margin-left: 6px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 6px; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(55,211,153,0.2); } }

/* Informations légales en bas de page */
.legal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 28px 24px 0; font-size: 0.8rem; }
.legal-footer a { color: var(--text-muted); }
.legal-footer a:hover { color: var(--text); text-decoration: underline; }

/* Form : création des questions */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.link-btn { background: none; border: none; font: inherit; cursor: pointer; }
textarea {
  width: 100%; resize: vertical; min-height: 52px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--text); font-family: inherit; font-size: 0.95rem; line-height: 1.5;
  transition: border-color 0.2s ease;
}
textarea:focus { outline: none; border-color: var(--primary); }
textarea::placeholder { color: var(--text-muted); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.q-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.q-card input { background: var(--surface); }
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.q-tools { display: flex; gap: 6px; }
.btn-icon.sm { width: 34px; height: 34px; font-size: 0.9rem; }
.btn-icon:disabled { opacity: 0.35; cursor: default; }
.q-required { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-muted); cursor: pointer; align-self: flex-start; }
.q-required input { width: 16px; height: 16px; accent-color: var(--primary); padding: 0; }

/* Form : page à remplir */
.form-desc { color: var(--text-muted); white-space: pre-line; word-break: break-word; }
.q-field { border: none; display: flex; flex-direction: column; gap: 10px; padding: 16px 0 4px; border-top: 1px solid var(--border); min-width: 0; }
.q-title { font-weight: 600; word-break: break-word; }
.req { color: var(--danger); font-weight: 700; }
.q-field.missing .q-title { color: var(--danger); }
.q-field.missing input, .q-field.missing textarea, .q-field.missing .ballot label { border-color: rgba(255,107,122,0.6); }

/* Form : réponses */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 100px; background: var(--bg-alt); border: 1px solid var(--border); align-self: flex-start; }
.tabs button { border: none; background: transparent; color: var(--text-muted); padding: 8px 16px; border-radius: 100px; cursor: pointer; font: 600 0.85rem 'Inter', sans-serif; }
.tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.q-summary { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.q-summary .result { background: var(--surface); }
.text-answers { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.text-answers li { padding: 8px 12px; background: var(--surface); border-radius: 10px; font-size: 0.9rem; white-space: pre-line; word-break: break-word; }
.answer-list { display: grid; grid-template-columns: minmax(120px, 35%) 1fr; gap: 8px 16px; font-size: 0.9rem; }
.answer-list dt { color: var(--text-muted); word-break: break-word; }
.answer-list dd { white-space: pre-line; word-break: break-word; }
@media (max-width: 520px) { .answer-list { grid-template-columns: 1fr; gap: 2px; } .answer-list dd { margin-bottom: 8px; } }
