/* common.css - Styles communs a toutes les pages SansMasque */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700;800;900&family=Nunito:wght@600;700;800;900&display=swap');

/* ── Variables ── */
:root {
  --bg: linear-gradient(160deg, #fdf2f8 0%, #faf5ff 40%, #f0f4ff 100%);
  --bg-dark: #1a1a2e;
  --accent: #e84393;
  --accent-light: #fd79a8;
  --accent-gold: #f9ca24;
  --accent-green: #55efc4;
  --text: #1a1a2e;
  --text-muted: #888;
  --text-dim: #aaa;
  --card-bg: white;
  --card-border: rgba(0,0,0,.06);
  --card-shadow: 0 2px 12px rgba(0,0,0,.07);
  --radius: 20px;
  --radius-lg: 24px;
  --radius-pill: 50px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
input, button, select, textarea { font: inherit; }

/* ── Body ── */
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 56px;
}

/* ── Page layout ── */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.page-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.empty-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-weight: 700;
}

/* ── Profile tabs ── */
.profile-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
}

.profile-tab {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
  border: 1.5px solid var(--card-border);
  background: var(--card-bg);
}

.profile-tab:hover {
  color: var(--text);
  border-color: rgba(232,67,147,.2);
}

.profile-tab.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Section content (utilise dans articles, pages, blog) ── */
.section-h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.section-p {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ── Hero sombre (accueil + articles blog) ── */
.hero-dark {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2046 50%, #3b1f5b 100%);
  padding: 56px 20px 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ── Bouton CTA rose (utilise partout) ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  box-shadow: 0 4px 16px rgba(232,67,147,.25);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,67,147,.35); opacity: .95; }
.btn-cta.lg { padding: 14px 36px; font-size: .95rem; }

/* ── Encadre highlight (a-propos, articles) ── */
.highlight-box {
  background: rgba(232,67,147,.06);
  border: 1.5px solid rgba(232,67,147,.12);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.7;
}

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

/* ── Auth Modal (reste sombre) ── */
#auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  background: #1e1e3a;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  position: relative;
  border: 1.5px solid rgba(255,255,255,.08);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.4rem;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  background: none;
  border: none;
  transition: color .15s;
}
.auth-close:hover { color: white; }

.auth-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: white;
  text-align: center;
  margin-bottom: 24px;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 12px;
  outline: none;
  transition: border-color .18s;
}
.auth-input:focus { border-color: rgba(232,67,147,.4); }
.auth-input::placeholder { color: rgba(255,255,255,.3); }

.auth-submit {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 4px;
}
.auth-submit:hover { opacity: .9; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: rgba(255,255,255,.25);
  font-size: .8rem;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.08);
}

.auth-google {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: white;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-google:hover {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
}
.auth-switch a {
  color: var(--accent-light);
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(231,76,60,.15);
  border: 1px solid rgba(231,76,60,.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: .82rem;
  font-weight: 700;
  color: #e74c3c;
  display: none;
}

/* ── Header auth buttons ── */
.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}

.header-auth-btn {
  font-weight: 800;
  font-size: .88rem;
  padding: 7px 18px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.15);
  background: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.header-auth-btn:hover {
  border-color: rgba(232,67,147,.3);
  color: white;
}
.header-auth-btn.primary {
  background: #e84393;
  border-color: transparent;
  color: white;
  font-size: .92rem;
  padding: 9px 24px;
  border-radius: 8px;
}
.header-auth-btn.primary:hover {
  background: #d63384;
  border-color: transparent;
}

.header-auth-avatar {
  font-size: 1.3rem;
  text-decoration: none;
  transition: transform .15s;
}
.header-auth-avatar:hover { transform: scale(1.15); }

.header-auth-user {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  transition: background .15s;
}
.header-auth-user:hover { background: rgba(255,255,255,.12); }
.header-auth-avatar-inline { font-size: 1.2rem; line-height: 1; }
.header-auth-pseudo {
  font-weight: 800;
  font-size: .82rem;
  color: white;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-auth-xp {
  font-weight: 800;
  font-size: .72rem;
  color: var(--accent-gold);
}

.header-auth-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .18s;
  flex-shrink: 0;
}
.header-auth-logout svg { display: block; width: 15px; height: 15px; }
.header-auth-logout:hover {
  color: #ff6b6b;
  border-color: rgba(255,107,107,.6);
  background: rgba(255,107,107,.08);
}

.header-auth-email-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3B82F6;
  text-decoration: none;
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 2px 8px rgba(59,130,246,.35);
  flex-shrink: 0;
  position: relative;
}
.header-auth-email-badge:hover {
  background: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,.45);
}
.header-auth-email-badge::after {
  content: 'Vérifie ton email pour protéger ton compte';
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1F2937;
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.header-auth-email-badge:hover::after { opacity: 1; }

@media (max-width: 640px) {
  .header-auth-logout { width: 28px; height: 28px; }
  .header-auth-logout svg { width: 13px; height: 13px; }
  .header-auth-email-badge { width: 28px; height: 28px; font-size: .72rem; }
  .header-auth-email-badge::after { display: none; }
}

/* ── Cookie banner ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

#cookie-banner p {
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  margin: 0;
}

#cookie-banner button {
  font-weight: 800;
  font-size: .8rem;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}

.cookie-accept { background: var(--accent); color: white; }
.cookie-refuse { background: rgba(255,255,255,.1); color: rgba(255,255,255,.5); }

/* ── Quiz cards (partages accueil, favoris, et tout ecran listant des quiz) ── */
.quiz-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 1px solid rgba(0,0,0,.04);
}
.quiz-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(232,67,147,.15); }
.quiz-card-banner {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  position: relative;
}
.quiz-card-banner.b-love { background: linear-gradient(135deg, #fde8f0, #fce4ec); }
.quiz-card-banner.b-psycho { background: linear-gradient(135deg, #ede8fd, #e8eaf6); }
.quiz-card-banner.b-scenario { background: linear-gradient(135deg, #fef5e0, #fff8e1); }
.quiz-card-banner.b-seduction { background: linear-gradient(135deg, #fde8e2, #fbe9e7); }
.quiz-card-banner.b-culture { background: linear-gradient(135deg, #e0f8f1, #e0f2f1); }
.quiz-card-banner.b-duo { background: linear-gradient(135deg, #ffd6e8, #ffb6cc); }
.quiz-card-banner.b-outil { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.quiz-card-banner.b-jeu { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.quiz-card-banner.b-ugc { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.quiz-card-new {
  position: absolute; top: 8px; left: 8px;
  font-size: .6rem; font-weight: 900;
  padding: 3px 10px; border-radius: 50px;
  background: #e84393; color: white;
  text-transform: uppercase; letter-spacing: .5px;
}
.quiz-card-content { padding: 14px 16px 16px; }
.quiz-card-title { font-size: .88rem; font-weight: 800; color: #1a1a2e; line-height: 1.35; margin-bottom: 6px; }
.quiz-card-desc { font-size: .75rem; font-weight: 700; color: #999; line-height: 1.55; margin-bottom: 12px; }
.quiz-card-footer { display: flex; align-items: center; gap: 8px; }
.quiz-card-tag {
  font-size: .62rem; font-weight: 800;
  padding: 3px 10px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: .4px;
}
.tag-love { background: #fde8f0; color: #c2185b; }
.tag-psycho { background: #ede8fd; color: #5e35b1; }
.tag-scenario { background: #fef5e0; color: #e65100; }
.tag-seduction { background: #fde8e2; color: #d84315; }
.tag-culture { background: #e0f8f1; color: #00897b; }
.tag-duo { background: #ffd6e8; color: #c2185b; }
.tag-outil { background: #e3f2fd; color: #1565c0; }
.tag-jeu { background: #f3e5f5; color: #6a1b9a; }
.tag-ugc { background: #fff3e0; color: #e65100; }
.quiz-card-info { font-size: .7rem; font-weight: 700; color: #bbb; margin-left: auto; }

/* Ribbon "Jeu à 2" en haut de la carte (banner) */
.quiz-card-ribbon {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #e84393, #c2185b);
  color: white;
  font-size: .6rem;
  font-weight: 900;
  padding: 4px 14px 5px;
  border-radius: 0 0 12px 12px;
  letter-spacing: .6px;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(232,67,147,.35);
  white-space: nowrap;
  z-index: 1;
}

/* Bandeau de badges (format + durée) sous le banner, au-dessus du titre */
.quiz-card-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.quiz-card-duree {
  font-size: .62rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 50px;
  background: #f5f5f7;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.quiz-card-format {
  font-size: .62rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.quiz-card-format.f-duo { background: linear-gradient(135deg, #e84393, #c2185b); color: white; }
.quiz-card-format.f-outil { background: linear-gradient(135deg, #1976d2, #1565c0); color: white; }
.quiz-card-format.f-jeu { background: linear-gradient(135deg, #8e24aa, #6a1b9a); color: white; }
.quiz-card-format.f-ugc { background: linear-gradient(135deg, #f57c00, #e65100); color: white; }

/* ── SOLO/DUO MODE — Segmented control intégré à la filter-bar ── */
.mode-segmented {
  position: relative;
  display: flex;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 5px;
  background: linear-gradient(135deg, #f8f4ff, #fef0f8);
  border-radius: 50px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
  border: 1px solid rgba(232,67,147,.12);
}
.mode-segmented::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 60px;
  background: radial-gradient(ellipse at center, rgba(232,67,147,.10), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.mode-pill {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: 50%;
  background: linear-gradient(135deg, #e84393, #c2185b);
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(232,67,147,.4);
  transition: transform .35s cubic-bezier(.34,1.4,.64,1), width .35s cubic-bezier(.34,1.4,.64,1);
  z-index: 1;
  pointer-events: none;
}
.mode-seg {
  position: relative;
  z-index: 2;
  padding: 11px 30px;
  border: none;
  background: transparent;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 900;
  font-size: .9rem;
  color: #888;
  transition: color .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.mode-seg:hover:not(.active) { color: #555; }
.mode-seg.active { color: white; }
.mode-seg-emoji {
  font-size: 1.1rem;
  filter: grayscale(.3);
  transition: filter .25s ease;
}
.mode-seg.active .mode-seg-emoji { filter: none; }

@media (max-width: 640px) {
  .mode-segmented { padding: 4px; margin-bottom: 10px; }
  .mode-seg { padding: 9px 22px; font-size: .82rem; }
  .mode-seg-emoji { font-size: 1rem; }
}
.quiz-card-fav {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.85);
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; box-shadow: 0 2px 6px rgba(0,0,0,.1);
  z-index: 2;
}
.quiz-card-fav:hover { transform: scale(1.15); }
.quiz-card-fav.active { background: rgba(255,255,255,.95); }

/* ── Mobile ── */
@media (max-width: 640px) {
  body { padding-top: 50px; }
  .page-container { padding: 30px 16px 40px; }
  .page-title { font-size: 1.5rem; }
  .profile-tabs { gap: 4px; flex-wrap: wrap; }
  .profile-tab { font-size: .78rem; padding: 8px 14px; }
  .header-auth-btn { font-size: .7rem; padding: 5px 10px; }
  .header-auth-xp { display: none; }
  .header-auth-pseudo { display: none; }
  .header-auth-user { padding: 4px 6px; gap: 0; }
}
