:root{
  --bg-color: #070708;
  --surface-color: #1c1c1e;

  --text-primary: #f3f4f6;
  --text-secondary: rgba(255,255,255,0.65);

  --accent-color: #d97706;
  --accent-hover: #b45309;
  --accent-glow: rgba(217,119,6,0.20);

  --border-soft: rgba(255,255,255,0.10);
  --border-focus: rgba(217,119,6,0.70);

  --font-main: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --radius-md: 12px;
  --radius-lg: 20px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html, body{ height:100%; }

body{
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  min-height: 100vh;
  display:flex;
  flex-direction:column;

  /* Noir profond (pas gris) + glow très discret */
  background:
    radial-gradient(900px 520px at 50% 0%, rgba(217,119,6,0.06), transparent 62%),
    radial-gradient(700px 420px at 12% 12%, rgba(99,102,241,0.05), transparent 64%),
    radial-gradient(700px 420px at 88% 18%, rgba(16,185,129,0.035), transparent 66%),
    var(--bg-color);
}

/* =========================
   HEADER
   ========================= */
.header{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 76px;
  padding: 0 26px;
  z-index: 100;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  background: linear-gradient(
    to bottom,
    rgba(7,7,8,0.96),
    rgba(7,7,8,0.72),
    rgba(7,7,8,0.00)
  );
  backdrop-filter: blur(10px);

  /* Ligne clean sous le header (pas sur le bouton) */
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
}

.header-left{ grid-column: 1; }

.header-center{
  grid-column: 2;
  display:flex;
  justify-content:center;
  align-items:center;
}

.header-right{
  grid-column: 3;
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.logo{
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.6px;
  opacity: 0.96;
  line-height: 1;
}

/* bouton connexion */
.account-btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.90);

  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;

  cursor:pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.account-btn:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}

/* =========================
   LAYOUT
   ========================= */
.container{
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 20px 40px;
  flex: 1;
}

.hero{
  text-align:center;
  margin-bottom: 26px;
  animation: fadeIn 0.8s ease-out;
}

/* Titre principal : plus petit que ton ancienne version */
.hero-title{
  font-size: clamp(1.9rem, 3.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 8px;
  letter-spacing: -0.6px;

  background: linear-gradient(135deg, #fff 0%, #cfcfcf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle{
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* =========================
   INPUT CARD
   ========================= */
.input-section{
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--border-soft);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  animation: slideUp 0.6s ease-out;
}

textarea{
  width:100%;
  height:120px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 15px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus{
  outline:none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(217,119,6,0.25);
}

.controls{
  display:flex;
  gap:10px;
  margin-top: 15px;
  flex-direction:column;
}
@media (min-width:480px){
  .controls{ flex-direction: row; }
}

.select-wrapper{ position:relative; flex:1; }

select{
  width:100%;
  padding: 14px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  appearance:none;
  cursor:pointer;
}
select:focus{
  outline:none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(217,119,6,0.25);
}

.cta-button{
  flex:2;
  border:none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 750;
  cursor:pointer;

  color:#141414;
  background: linear-gradient(90deg, rgba(217,119,6,0.92), rgba(217,119,6,1));
  box-shadow: 0 18px 50px var(--accent-glow);
  transition: transform 0.18s, filter 0.18s;
}
.cta-button:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.cta-button:active{ transform: translateY(0); }

.limit-info{
  text-align:center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.60);
  margin-top: 10px;
}

/* =========================
   RESULTS
   ========================= */
.results-section{
  margin-top: 30px;
  display:flex;
  flex-direction:column;
  gap:15px;
}
.hidden{ display:none !important; }

.reply-card{
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 20px;
  border-radius: var(--radius-md);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  animation: fadeIn 0.5s ease-out;
}
.reply-card:hover{
  border-color: rgba(217,119,6,0.55);
  transform: translateX(4px);
}
.reply-text{
  font-size: 1.05rem;
  padding-right: 30px;
}

/* pastille copie */
.copy-pill{
  position:absolute;
  top:14px;
  right:14px;
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(255,165,0,0.35);
  border: 1px solid rgba(255,165,0,0.55);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.reply-card:hover .copy-pill{
  transform: scale(1.35);
  background: rgba(255,165,0,0.6);
  box-shadow: 0 0 0 6px rgba(255,165,0,0.15);
}
.copy-pill.copied{
  background: rgba(255,165,0,1);
  box-shadow: 0 0 0 8px rgba(255,165,0,0.25);
}
.copy-pill::after{
  content: attr(data-tip);
  position:absolute;
  top:-28px;
  right:-6px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1;
  border-radius: 999px;
  background: rgba(20,20,20,0.85);
  color:#fff;
  opacity:0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events:none;
  white-space:nowrap;
}
.copy-pill.copied::after{
  opacity:1;
  transform: translateY(0);
}

/* =========================
   PAYWALL
   ========================= */
.paywall-overlay{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000;
  padding:20px;
}
.paywall-content{
  background: rgba(28,28,30,0.95);
  border: 1px solid rgba(217,119,6,0.45);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  text-align:center;
  max-width: 400px;
  width:100%;
  box-shadow: 0 0 0 1px rgba(217,119,6,0.12), 0 50px 140px rgba(0,0,0,0.75);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.paywall-icon{ font-size:3rem; margin-bottom:15px; }
.paywall-pitch{ color: rgba(255,255,255,0.72); margin: 15px 0; }
.price-tag{
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-color);
  margin: 20px 0;
}
.upgrade-button{
  width:100%;
  padding:15px;
  background:#fff;
  color:#111;
  border:none;
  border-radius: var(--radius-md);
  font-weight:800;
  font-size:1.1rem;
  cursor:pointer;
  margin-bottom:10px;
}
.close-paywall{
  background: transparent;
  border:none;
  color: rgba(255,255,255,0.70);
  cursor:pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* =========================
   LOGIN MODAL
   ========================= */
.login-modal{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1100;
  padding:20px;
}
.login-box{
  background: rgba(28,28,30,0.94);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 40px 120px rgba(0,0,0,0.70);
  border-radius: 18px;
  padding: 18px;
  width: min(440px, 92vw);
}

.google-btn{
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  color: #111;
  font-weight: 800;
  letter-spacing: 0.1px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  cursor:pointer;
}
.google-icon{
  width:18px; height:18px;
  background: url("https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg") center/contain no-repeat;
}

#loginEmail{
  width:100%;
  height:46px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: var(--text-primary);
  padding: 0 12px;
  outline:none;
  margin-top:10px;
}
.email-btn{
  width:100%;
  height:46px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-weight: 800;
  cursor:pointer;
  margin-top:10px;
}
.login-close{
  margin-top:10px;
  width:100%;
  height:42px;
  border-radius: 12px;
  border:0;
  background: transparent;
  color: rgba(255,255,255,0.70);
  cursor:pointer;
}

/* petites utilitaires si tu les utilises */
.divider{ display:flex; align-items:center; gap:10px; margin: 12px 0; color: rgba(255,255,255,0.55); }
.divider::before, .divider::after{ content:""; flex:1; height:1px; background: rgba(255,255,255,0.10); }
.divider span{ font-size: 0.85rem; }
.sr-only{ position:absolute; left:-9999px; }

/* =========================
   ANIMATIONS
   ========================= */
@keyframes fadeIn{ from{ opacity:0; } to{ opacity:1; } }
@keyframes slideUp{ from{ opacity:0; transform: translateY(20px);} to{ opacity:1; transform: translateY(0);} }
@keyframes popIn{ from{ opacity:0; transform: scale(0.92);} to{ opacity:1; transform: scale(1);} }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 420px){
  .header{ padding: 0 16px; }
  .logo{ font-size: 1.45rem; }
  .account-btn{ padding: 9px 12px; font-size: 0.9rem; }
  .container{ padding-top: 112px; }
}
