
:root{
 --bg:#0b0f1a;
 --card:#12182b;
 --accent:#6c8cff;
 --danger:#ff5c7a;
 --text:#eef1ff;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui;background:var(--bg);color:var(--text)}
.container{max-width:1100px;margin:auto;padding:20px}
.topbar{background:#0e1326;border-bottom:1px solid #1e2547}
.topbar .container{display:flex;justify-content:space-between;align-items:center}
.logo{font-size:22px;font-weight:800}
.logo span{color:var(--accent)}
nav a{margin-left:15px;color:var(--text);text-decoration:none}
nav a.danger{color:var(--danger)}
.card{background:linear-gradient(180deg,#141a35,#0f1430);border-radius:16px;padding:20px;box-shadow:0 20px 40px rgba(0,0,0,.4);margin:20px 0; overflow-x: auto;
    overflow-y: visible;}
.auth{max-width:420px;margin:40px auto}
input{width:100%;padding:14px;margin:10px 0;border-radius:12px;border:1px solid #2b3366;background:#0b1025;color:var(--text)}
.btn{display:inline-block;padding:12px 18px;border-radius:14px;border:none;cursor:pointer;text-decoration:none;color:#fff;background:#2b3366}
.btn.primary{background:linear-gradient(135deg,var(--accent),#3aa0ff)}
.btn.danger{background:linear-gradient(135deg,var(--danger),#ff8fa3)}
.alert{background:#ff5c7a33;padding:10px;border-radius:10px;margin-bottom:10px}
.table{width:100%;border-collapse:collapse;margin-top:15px}
.table th,.table td{padding:12px;border-bottom:1px solid #222a55}
.badge{padding:6px 10px;border-radius:20px;background:#2b3366}
.footer{text-align:center;padding:20px;color:#aaa}

/* ===== Question Form – Modern UI ===== */

.section-title {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.answer-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #141a35, #0f1430);
    border-radius: 14px;
    border: 1px solid #2a3266;
}

.answer-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #2b3366;
    background: #0b1025;
    color: #eef1ff;
    font-size: 15px;
}

.answer-input::placeholder {
    color: #9aa3d8;
}

/* Switch (Bonne réponse) */
.switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.switch input {
    display: none;
}

.switch .slider {
    width: 42px;
    height: 22px;
    background: #2b3366;
    border-radius: 999px;
    position: relative;
    transition: background .25s;
}

.switch .slider::before {
    content: "";
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform .25s;
}

.switch input:checked + .slider {
    background: linear-gradient(135deg, #6c8cff, #3aa0ff);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.switch-label {
    font-size: 13px;
    color: #cdd3ff;
}

/* Delete icon */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #ff5c7a33;
    color: #ff5c7a;
    font-size: 18px;
    cursor: pointer;
}

.btn-icon:hover {
    background: #ff5c7a55;
}

/* Actions row */
.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.actions-right {
    display: flex;
    gap: 10px;
}

.btn.ghost {
    background: #1a224a;
    color: #cdd3ff;
}

/* ===== Field system (label + textarea modern) ===== */
.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin: 12px 0 18px;
}

.field-label{
  font-size: 13px;
  font-weight: 700;
  color: #cdd3ff;
  letter-spacing: .2px;
}

.field-textarea{
  width:100%;
  min-height: 120px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #2b3366;
  background: radial-gradient(900px 200px at 10% 0%, rgba(108,140,255,.16), transparent 55%),
              #0b1025;
  color: #eef1ff;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .05s ease;
}

.field-textarea::placeholder{
  color:#9aa3d8;
}

.field-textarea:focus{
  border-color: rgba(108,140,255,.75);
  box-shadow: 0 0 0 4px rgba(108,140,255,.18);
}

.field-textarea:active{
  transform: translateY(1px);
}

.field-hint{
  font-size: 12px;
  color: #9aa3d8;
}

.field-input{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #2b3366;
  background: radial-gradient(900px 200px at 10% 0%, rgba(108,140,255,.12), transparent 55%),
              #0b1025;
  color: #eef1ff;
  font-size: 15px;
  outline:none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-input:focus{
  border-color: rgba(108,140,255,.75);
  box-shadow: 0 0 0 4px rgba(108,140,255,.18);
}
.field-input::placeholder{ color:#9aa3d8; }

/* ============================
   PLAY QUIZ — MODERN UI
============================ */

.quiz-header {
    margin-bottom: 26px;
}

.quiz-progress {
    font-size: 13px;
    color: #9aa3d8;
    letter-spacing: .3px;
}

.quiz-question {
    margin-top: 8px;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
}

/* Answers */
.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quiz-answer {
    cursor: pointer;
}

.quiz-answer input {
    display: none;
}

.answer-box {
    display: block;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, #141a35, #0f1430);
    border: 1px solid #2a3266;
    color: #eef1ff;
    font-size: 16px;
    transition: all .2s ease;
}

/* Hover */
.quiz-answer:hover .answer-box {
    border-color: #6c8cff;
    transform: translateY(-1px);
}

/* Selected */
.quiz-answer input:checked + .answer-box {
    background: linear-gradient(135deg, #6c8cff, #3aa0ff);
    color: #ffffff;
    border-color: transparent;
}

/* Button */
.btn.full {
    width: 100%;
    margin-top: 22px;
    font-size: 16px;
    padding: 14px;
}

/* Error */
.quiz-error {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 80, 120, .15);
    color: #ff8ca3;
    font-size: 14px;
}

.hidden {
    display: none;
}

/* ===== Feedback réponses ===== */

.answer-box.good-answer {
    border: 2px solid #3cff9e;
    background: linear-gradient(135deg, #1f7a4d, #0f3d2b);
    color: #eafff4;
}

.answer-box.bad-answer {
    border: 2px solid #ff5c7a;
    background: linear-gradient(135deg, #7a1f35, #3d0f1f);
    color: #ffeaf0;
}

.quiz-feedback {
    margin-top: 18px;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    text-align: center;
}

.quiz-feedback.success {
    background: rgba(60, 255, 158, .15);
    color: #3cff9e;
}

.quiz-feedback.fail {
    background: rgba(255, 92, 122, .15);
    color: #ff8ca3;
}

/* =========================
   AUTH PAGES — 2026 UI
========================= */

.auth-wrapper {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 32px;
  border-radius: 22px;
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(108,140,255,.25), transparent 60%),
    linear-gradient(180deg, #141a35, #0f1430);
  border: 1px solid #2a3266;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #ffffff;
}

.auth-subtitle {
  font-size: 14px;
  color: #9aa3d8;
  margin-bottom: 26px;
}

/* Fields reuse */
.field {
  margin-bottom: 18px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: #cdd3ff;
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #2b3366;
  background: #0b1025;
  color: #eef1ff;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field-input::placeholder {
  color: #9aa3d8;
}

.field-input:focus {
  border-color: rgba(108,140,255,.75);
  box-shadow: 0 0 0 4px rgba(108,140,255,.18);
}

/* Actions */
.auth-actions {
  margin-top: 10px;
}

.btn.full {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

/* Footer */
.auth-footer {
  margin-top: 18px;
  font-size: 13px;
  color: #9aa3d8;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.auth-footer a {
  color: #6c8cff;
  text-decoration: none;
  font-weight: 600;
}

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

/* ============================
   HOME / LANDING PAGE
============================ */

.home-hero {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.hero-content {
    max-width: 820px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(108,140,255,.15);
    color: #9fb2ff;
    margin-bottom: 18px;
}

.hero-content h1 {
    font-size: 46px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #6c8cff, #3aa0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: #9aa3d8;
    max-width: 640px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-secondary {
    margin-top: 18px;
    font-size: 14px;
    color: #9aa3d8;
}

.hero-secondary a {
    color: #6c8cff;
    font-weight: 600;
    margin-left: 6px;
}

/* Features */
.home-features {
    padding: 80px 20px;
}

.features-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 26px;
}

.feature-card {
    padding: 26px 24px;
    border-radius: 22px;
    background:
        radial-gradient(600px 200px at 20% 0%, rgba(108,140,255,.18), transparent 60%),
        linear-gradient(180deg, #141a35, #0f1430);
    border: 1px solid #2a3266;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: #9aa3d8;
    line-height: 1.5;
}

/* CTA */
.home-cta {
    padding: 80px 20px;
}

.cta-card {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 40px;
    border-radius: 26px;
    background:
        radial-gradient(800px 260px at 20% 0%, rgba(108,140,255,.25), transparent 60%),
        linear-gradient(180deg, #141a35, #0f1430);
    border: 1px solid #2a3266;
}

.cta-card h2 {
    font-size: 32px;
    margin-bottom: 14px;
}

.cta-card p {
    font-size: 16px;
    color: #9aa3d8;
    margin-bottom: 26px;
}

/* Buttons size */
.btn.large {
    padding: 16px 22px;
    font-size: 16px;
}

/* ===== Player index message ===== */
.auth-message {
  min-height: 20px;
  margin-bottom: 14px;
  font-size: 14px;
  text-align: center;
  color: #9aa3d8;
}

.auth-message.error {
  color: #ff8ca3;
}

.auth-message.success {
  color: #3cff9e;
}

/* ===== Podium ===== */

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 18px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}

.podium-item {
    width: 180px;
    padding: 22px 18px;
    border-radius: 20px;
    text-align: center;
    background:
        radial-gradient(500px 160px at 20% 0%, rgba(108,140,255,.25), transparent 60%),
        linear-gradient(180deg, #141a35, #0f1430);
    border: 1px solid #2a3266;
}

.podium-item.rank-1 {
    transform: scale(1.1);
    border-color: #ffd700;
}

.podium-item.rank-2 {
    border-color: #c0c0c0;
}

.podium-item.rank-3 {
    border-color: #cd7f32;
}

.podium-rank {
    font-size: 32px;
    font-weight: 900;
}

.podium-name {
    font-size: 16px;
    font-weight: 700;
    margin-top: 6px;
}

.podium-score {
    margin-top: 6px;
    font-size: 14px;
    color: #9aa3d8;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

/* =========================
   FOOTER — QuizRush 2026
========================= */

.footer {
  margin-top: 80px;
  padding: 26px 16px;
  text-align: center;
  font-size: 13px;
  color: #9aa3d8;
  border-top: 1px solid rgba(108,140,255,.15);
  background: linear-gradient(
    180deg,
    rgba(10,14,32,.6),
    rgba(5,8,20,.9)
  );
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Lien Gest Corp */
.footer a {
  color: #cdd3ff;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color .25s ease;
}

/* Soulignement élégant au hover */
.footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #6c8cff, #3aa0ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.footer a:hover {
  color: #ffffff;
}

.footer a:hover::after {
  transform: scaleX(1);
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin: 20px 0 36px;
}

.stat-card {
  padding: 22px 20px;
  border-radius: 18px;
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(108,140,255,.18), transparent 60%),
    linear-gradient(180deg, #141a35, #0f1430);
  border: 1px solid #2a3266;
  text-align: center;
}

.stat-card span {
  display: block;
  font-size: 13px;
  color: #9aa3d8;
  margin-bottom: 6px;
}

.stat-card strong {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
}

/* =========================
   TOAST — QuizRush 2026
========================= */

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(20px);
  transition: all .35s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hidden {
  display: none;
}

/* ===== Variantes ===== */
.toast.success {
  background: linear-gradient(135deg, #2ed573, #1abc9c);
}

.toast.error {
  background: linear-gradient(135deg, #ff5c7a, #ff3b3b);
}

/* ===== Icône ===== */
.toast-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  animation: pop 0.45s ease;
}

/* Animation pop */
@keyframes pop {
  0%   { transform: scale(.4); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* Option responsive */
@media (max-width: 600px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 20px;
    justify-content: center;
  }
}

.table-actions .btn i {
  font-size: 15px;
}

.toast-icon i {
  font-size: 18px;
}

/* ===== Boutons d'actions (icônes) ===== */

.table-actions .btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-actions .btn i {
  font-size: 16px;
  color: #eaf0ff; /* ICÔNE VISIBLE */
}

/* Bouton danger (supprimer) */
.table-actions .btn.danger {
  background: linear-gradient(135deg, #ff5c7a, #ff3b3b);
}

.table-actions .btn.danger i {
  color: #fff;
}

/* Hover */
.table-actions .btn:hover i {
  transform: scale(1.15);
  transition: transform .2s ease;
}

.table-actions a[href*="qcm_form"] i { color: #6c8cff !important; }
.table-actions a[href*="questions"] i { color: #ffd86c !important; }
.table-actions a[href*="ranking"] i { color: #3cff9e !important; }
.table-actions a[onclick*="copyInviteLink"] i { color: #9aa3ff !important; }

/* =========================
   FIX ICONES ACTIONS (FINAL)
========================= */

.table-actions .btn {
  background: #2b3366;
}

.table-actions .btn i {
  color: #ffffff !important;   /* FORCE visibilité */
  font-size: 16px;
  line-height: 1;
}

/* Bouton danger */
.table-actions .btn.danger {
  background: linear-gradient(135deg, #ff5c7a, #ff3b3b);
}

.table-actions .btn.danger i {
  color: #ffffff !important;
}

/* Hover */
.table-actions .btn:hover {
  filter: brightness(1.15);
}

.badge.perfect {
  margin-left: 6px;
  background: linear-gradient(135deg, #3cff9e, #1abc9c);
  color: #0b1025;
  font-weight: 700;
}

.badge.fast{
  margin-left: 6px;
  background: linear-gradient(135deg, #6c8cff, #3aa0ff);
  color: #ffffff;
  font-weight: 700;
}
.podium-score small{
  display:block;
  margin-top:8px;
  color:#9aa3d8;
  line-height:1.35;
}

.home-shared { padding: 40px 20px 80px; }
.shared-head { max-width: 1100px; margin: 0 auto 18px; }
.shared-grid{
  max-width:1100px;margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}
.shared-card{
  padding:20px;border-radius:18px;
  background: radial-gradient(600px 200px at 20% 0%, rgba(108,140,255,.18), transparent 60%),
              linear-gradient(180deg, #141a35, #0f1430);
  border:1px solid #2a3266;
}
.shared-title{font-size:16px;font-weight:800;margin-bottom:10px}
.shared-code{color:#9aa3d8;font-size:13px;margin-bottom:14px}
.shared-actions{display:flex;justify-content:flex-start}

.share-form { margin: 0; }