﻿body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: white;
  background: radial-gradient(60% 60% at 50% 30%, #18183a 0%, #0a0a14 45%, #05050b 100%);
  min-height: 100vh;
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
  box-sizing: border-box;
}

.banner {
  background: linear-gradient(#0f6b3a, #0c5a31);
  padding: 14px 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

.banner-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gift-text {
  flex: 0 0 28px;
  font-weight: 700;
  font-size: 1.2rem;
}

.gift-text img {
  display: block;
  width: 28px;
  height: 28px;
}

.banner-line1 {
  font-size: 0.9rem;
}

.banner-line2 {
  font-size: 0.75rem;
  opacity: 0.9;
}

.title {
  font-size: 56px;
  font-weight: 800;
  margin: 10px 0;
  text-transform: lowercase;
  text-align: center;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

input {
  height: 55px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a14;
  color: white;
  font-size: 18px;
  width: 100%;
  box-sizing: border-box;
}

.btn {
  height: 55px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(#4a2cff, #2d1aa6);
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.hint {
  font-size: 0.7rem;
  text-align: center;
  margin-top: 0.8rem;
  color: #aaa;
}

.offerwall-card {
  background: #0a0a14;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

.offerwall-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.offerwall-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, #b0a0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.offerwall-header p {
  color: #aaa;
  font-size: 0.85rem;
  margin: 0.3rem 0;
}

.progress-counter {
  margin: 1rem 0;
  font-weight: bold;
  font-size: 1rem;
  color: #b0a0ff;
  background: rgba(74, 44, 255, 0.15);
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 20px;
}

.offers-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.offer-item {
  background: rgba(10, 10, 20, 0.9);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  gap: 10px;
  flex-wrap: wrap;
}

.offer-item:hover {
  border-color: rgba(74, 44, 255, 0.5);
  background: rgba(20, 20, 40, 0.9);
}

.offer-info {
  flex: 1;
  min-width: 0;
}

.offer-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
  word-break: break-word;
}

.offer-desc {
  font-size: 0.7rem;
  color: #888;
  margin-top: 2px;
  word-break: break-word;
}

.start-offer-btn {
  background: linear-gradient(135deg, #4a2cff, #2d1aa6);
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
  white-space: nowrap;
}

.start-offer-btn:hover {
  transform: scale(1.02);
  background: linear-gradient(135deg, #5f3cff, #3a25b8);
}

.offerwall-footer {
  font-size: 0.7rem;
  text-align: center;
  margin-top: 1.2rem;
  color: #555;
}

/* Mobile Responsive Styles */
@media (max-width: 600px) {
  .wrap {
    gap: 12px;
    padding: 16px;
    justify-content: flex-start;
    padding-top: 40px;
  }
  
  .banner {
    padding: 12px 16px;
  }
  
  .banner-line1 {
    font-size: 0.85rem;
  }
  
  .banner-line2 {
    font-size: 0.7rem;
  }
  
  .gift-text {
    font-size: 1rem;
  }
  
  .title {
    font-size: 40px;
    margin: 5px 0;
  }
  
  input {
    height: 48px;
    font-size: 16px;
    padding: 0 14px;
  }
  
  .btn {
    height: 48px;
    font-size: 16px;
  }
  
  .offerwall-card {
    padding: 1rem;
  }
  
  .offerwall-header h2 {
    font-size: 1.2rem;
  }
  
  .offerwall-header p {
    font-size: 0.75rem;
  }
  
  .progress-counter {
    font-size: 0.85rem;
    padding: 0.2rem 0.8rem;
  }
  
  .offer-item {
    padding: 0.6rem 0.75rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .offer-info {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .offer-name {
    font-size: 0.85rem;
  }
  
  .offer-desc {
    font-size: 0.65rem;
  }
  
  .start-offer-btn {
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    width: auto;
    align-self: flex-start;
  }
  
  .offerwall-footer {
    font-size: 0.65rem;
    margin-top: 1rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .wrap {
    padding: 12px;
  }
  
  .title {
    font-size: 32px;
  }
  
  .banner-line1 {
    font-size: 0.8rem;
  }
  
  .banner-line2 {
    font-size: 0.65rem;
  }
  
  input {
    height: 46px;
    /* Jamais sous 16px : en dessous, iOS zoome automatiquement au focus et
       l'utilisateur se retrouve avec la page agrandie et decadree. */
    font-size: 16px;
  }

  .btn {
    height: 46px;
    font-size: 16px;
  }

  .offerwall-card {
    padding: 0.875rem;
  }

  .offer-item {
    padding: 0.5rem 0.65rem;
  }

  .offer-name {
    font-size: 0.8rem;
  }
}

/* ---- Durcissement mobile ---------------------------------------------- */

/* Aucun debordement horizontal possible, quelle que soit la largeur. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { min-width: 0; }

/* Encoches et barres systeme (iPhone, Android recents). */
.wrap {
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Cibles tactiles : 44px est le minimum recommande, on l'applique a tout
   controle interactif et pas seulement aux deux principaux. */
.btn, input, button, a[role="button"], .offer-item {
  min-height: 44px;
  touch-action: manipulation;
}

/* Un titre en taille fixe deborde sur les petits ecrans (320px). */
.title { font-size: clamp(26px, 9vw, 56px); overflow-wrap: anywhere; }

/* Les libelles d'offres peuvent etre longs : on autorise la coupure plutot
   que de laisser la carte s'elargir au-dela de l'ecran. */
.offer-name, .offerwall-header h2, .hint { overflow-wrap: anywhere; }

/* Retire le halo bleu de tap sur Android sans supprimer le focus clavier. */
.btn, button, a { -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12); }
.btn:focus-visible, button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid #8b7cff;
  outline-offset: 2px;
}

