/* style.css */

/* Reset & basics */
* {
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #333;
}
a {
    color: #4f46e5;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: #4f46e5;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: fixed;
    top: 0; left: 0; right: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    z-index: 1000;
}
header h1 {
    margin: 0;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 1px;
}
nav button {
    background: white;
    color: #4f46e5;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}
nav button:hover {
    background-color: #3730a3;
    color: white;
}

/* Main content */
main {
    max-width: 960px;
    margin: 90px auto 40px;
    padding: 0 15px;
}

/* Section titles */
h2 {
    color: #4f46e5;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 3px solid #4f46e5;
    display: inline-block;
    padding-bottom: 5px;
}

/* Offers cards */
.offers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
}
.offer-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
    padding: 25px;
    width: 260px;
    text-align: center;
    transition: transform 0.3s ease;
}
.offer-card:hover {
    transform: translateY(-8px);
}
.offer-card h3 {
    margin: 0 0 15px;
    font-size: 1.3rem;
    color: #3730a3;
}
.offer-price {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0 20px;
    color: #4f46e5;
}
.offer-card a {
    display: inline-block;
    padding: 10px 22px;
    background: #4f46e5;
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.offer-card a:hover {
    background-color: #3730a3;
}

/* Search form */
.search-box {
    text-align: center;
    margin-bottom: 30px;
}
.search-box input[type="text"] {
    width: 320px;
    max-width: 90%;
    padding: 12px 16px;
    font-size: 1.1rem;
    border: 2px solid #4f46e5;
    border-radius: 30px;
    outline-offset: 2px;
    transition: border-color 0.3s ease;
}
.search-box input[type="text"]:focus {
    border-color: #3730a3;
}
.search-box button {
    margin-left: 12px;
    padding: 12px 22px;
    font-size: 1.1rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.search-box button:hover {
    background-color: #3730a3;
}

/* Machines table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.1);
    background: white;
}
th, td {
    padding: 12px 15px;
    text-align: left;
}
th {
    background-color: #4f46e5;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}
tr:nth-child(even) {
    background-color: #f8f8ff;
}
tr:hover {
    background-color: #e0e0ff;
}
.table-link {
    color: #4f46e5;
    font-weight: 600;
}
.table-link:hover {
    text-decoration: underline;
}

/* QR code reader */
#reader {
    margin: 40px auto 20px;
    width: 320px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.25);
}
#qr-result {
    font-weight: 700;
    color: #4f46e5;
    text-align: center;
    margin-top: 10px;
    min-height: 24px;
}

/* Responsive */
@media (max-width: 600px) {
    .offers-container {
        flex-direction: column;
        align-items: center;
    }
    .offer-card {
        width: 90%;
    }
    .search-box input[type="text"] {
        width: 80%;
        margin-bottom: 10px;
    }
    .search-box button {
        width: 80%;
        margin-left: 0;
    }
}
.offers-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}



.machine-image {
  max-width: 400px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}
nav {
  display: flex;
  align-items: center;
  
  gap: 1rem;
}


nav button:hover {
  background-color: #357ABD;
}
.user-credits {
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  user-select: none;
  padding-left: 0.5rem;
}

.user-credits.has-credits {
  color: #ffffff; /* vert */
}

.user-credits.zero-credits {
  color: #ffffff; /* rouge */
}
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  background-color: #111;
  color: #fff;
  padding: 10px 0;
  border-top: 2px solid #444;
  border-bottom: 2px solid #444;
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 25s linear infinite;
  font-size: 16px;
}

@keyframes scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}


.offers-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.offer-card {
  background: #fff;
  border: 2px solid #ccc;
  padding: 20px;
  border-radius: 12px;
  width: 250px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
  text-align: center;
}
.offer-card:hover {
  transform: scale(1.05);
  border-color: #ff6600;
  box-shadow: 0 6px 15px rgba(255,102,0,0.6);
}
.best-deal {
  border-color: #ff4500;
  background: linear-gradient(135deg, #ffaf00, #ff4500);
  color: white;
  box-shadow: 0 6px 15px rgba(255,69,0,0.7);
}
.best-deal .badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  color: #ff4500;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 0.9rem;
  box-shadow: 0 0 8px #ff4500;
  animation: pulse 2s infinite;
}
.highlight-text {
  margin-top: 10px;
  font-weight: bold;
  font-size: 0.95rem;
  text-shadow: 1px 1px 2px #b34700;
}

/* Animation pulse pour attirer l'œil */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}
.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #9f7aea;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.user-avatar:hover {
    background-color: #7b61d1;
}
.footer {
  background: linear-gradient(to right, #764ba2, #4f46e5);
  color: #fff;
  padding: 25px 0;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  margin-top: 60px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

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

.footer p {
  margin: 0 0 10px;
  font-weight: 300;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #e5dcff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}
