:root {
    --bg-dark: #0a0a12;
    --bg-card: rgba(25, 25, 35, 0.6);
    --color-primary: #ffffff;
    --color-secondary: rgba(255, 255, 255, 0.8);
    --color-muted: rgba(255, 255, 255, 0.6);
    --accent: #9b6dff;
    --accent-light: rgba(155, 109, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-subtle: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-sans: 'Inter', system-ui, sans-serif;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}
a{
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 20% 35%, rgba(155, 109, 255, 0.15), transparent 25%),
        radial-gradient(circle at 75% 65%, rgba(135, 89, 235, 0.1), transparent 30%);
    background-attachment: fixed;
    color: var(--color-primary);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.5;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
    width: min(1200px, 92%);
    max-width: 90svw;
    margin-left: auto;
    margin-right: auto;
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  color: var(--color-primary);
}

.logo-img {
  height: 32px; /* Ajuster selon la taille souhaitée */
  width: auto;
  vertical-align: middle;
}

.solde {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.solde i {
    color: var(--accent);
}

/* Contest Card */
.contest-card {
    position: relative;
    width: min(400px, 94%);
    margin: 1.8rem auto;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-strong);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: transform 0.4s var(--transition-bounce), box-shadow 0.4s ease;
}

.contest-card__tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contest-card__tag i {
    color: var(--accent);
    font-size: 0.9rem;
}

.contest-card__media {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.contest-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s var(--transition-smooth), filter 0.6s ease;
}

.contest-card__content {
    padding: 1.5rem;
}

.contest-card__title {
    margin: 0 0 0.6rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.contest-card__desc {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.contest-card__footer {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: auto;
    flex-wrap: nowrap; /* Force une ligne unique */
}

/* Ticket Selector */
.ticket-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0; /* Ne pas rétrécir */
}

.ticket-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.ticket-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.ticket-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.ticket-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.8rem;
    user-select: none;

    /* réserver assez d'espace pour 4 chiffres sans pousser les boutons */
    min-width: max(3ch, 20px); /* 4 chiffres + un peu de marge */
    flex: 0 0 auto;            /* ne pas rétrécir ni grandir */
}

.ticket-value {
    width: 100%;
    text-align: center;
    font-variant-numeric: tabular-nums; /* chiffres monospaces pour stabilité visuelle */
}

.ticket-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.ticket-plural {
    opacity: 0;
    transition: opacity 0.2s;
}

/* CTA Button */
.contest-card__cta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    padding: 0 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    position: relative;
    overflow: hidden;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

.contest-card__cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
    opacity: 0.8;
}

.contest-card__cta i {
    font-size: 1rem;
    transition: transform 0.3s var(--transition-bounce);
    position: relative;
}

.contest-card__cta:hover i {
    transform: translateX(3px);
}

.contest-card__cta:active {
    transform: scale(0.98);
}

/* tag "Misé" posé sur l'image, sous le badge date */
.bet-tag{
        position: absolute;
        top: 10px;
        left: 10px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border-radius: 20px;
        padding: 5px 10px;
        font-size: 0.75rem;
        color: white;
        display: flex;
        align-items: center;
        gap: 4px;
        font-weight: 500;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        z-index: 2;
}

/* style pour le nombre dans le tag */
.bet-tag strong{
    color: var(--color-primary);
    font-weight: 700;
    margin-left: 0.15rem;
    min-width: 2ch;
    text-align: center;
    display: inline-block;
}

/* Si tu veux le tag à droite sous la date, change left:8px; par right:8px; */

/* Responsive amélioré */
@media (max-width: 420px) {
    .contest-card__media {
        height: 200px;
    }
    
    .contest-card__content {
        padding: 1.25rem;
    }
    
    .contest-card__title {
        font-size: 1.25rem;
    }
    
    .contest-card__desc {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    .ticket-btn {
        width: 36px;
        height: 36px;
    }
    
    .contest-card__footer {
        gap: 0.55rem;
    }
    
    /* Assurez-vous que le bouton est plus visible et facile à toucher sur mobile */
    .contest-card__cta {
        min-height: 46px;
        padding: 0 1rem;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .contest-card__footer {
        gap: 0.4rem;
    }
    
    .ticket-display {
        padding: 0 0.5rem;
    }
    
    .contest-card__cta {
        padding: 0 0.8rem;
        font-size: 0.9rem;
    }
    
    .ticket-btn {
        width: 34px;
        height: 34px;
    }
    
    .contest-card__cta i {
        font-size: 0.9rem;
    }
}

/* Ajustements supplémentaires pour très petits écrans */
@media (max-width: 330px) {
    .ticket-btn i {
        font-size: 0.9em;
    }
    
    .ticket-value {
        font-size: 1rem;
    }
    
    .ticket-label {
        font-size: 0.6rem;
    }
    
    .contest-card__cta {
        padding: 0 0.6rem;
    }
    
    .ticket-display {
        padding: 0 0.3rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive navbar & typographie adaptive */
html { font-size: 16px; }

.navbar{
    padding: clamp(0.5rem, 2.5vw, 1rem);
    width: min(1200px, 96%);
    margin-inline: auto;
    gap: 0.6rem;
    align-items: center;
}

/* Logo flexible, coupe propre sur petits écrans */
.logo{
    margin-left: .5rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    line-height: 1;
}

/* Solde compact, ne pousse pas le logo hors écran */
.solde{
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    padding: clamp(0.25rem, 1.5vw, 0.5rem) clamp(0.6rem, 2.5vw, 1.1rem);
    border-radius: 999px;
    min-width: 56px;
    justify-content: center;
}

/* Icônes adaptatives */
.navbar i, .solde i {
    font-size: clamp(0.9rem, 3.2vw, 1.1rem);
    line-height: 1;
}
#ezoic-pub-ad-placeholder-101 { min-height: 250px; display:block; }

@media (max-width: 600px) {
    .navbar { padding: 0.45rem 0.6rem; gap: 0.45rem;}
    .logo { font-size: 0.98rem; }
    .solde { font-size: 0.82rem; padding: 0rem 0.6rem; min-width:50px; }
}
/* Very small screens: tighten spacing but keep single-line when possible */
@media (max-width: 360px) {
    .navbar { padding: 0.45rem 0.6rem; gap: 0.45rem;}
    .logo { font-size: 0.98rem; }
    .solde { font-size: 0.82rem; padding: 0.25rem 0.6rem; min-width:50px; }
}

/* Ultra small: allow wrapping while keeping elements readable */
@media (max-width: 320px) {
    .navbar { flex-wrap: wrap; align-items: center; gap: 0.4rem; }
    .logo { flex-basis: 60%; }
    .solde { flex-basis: 38%; justify-content: flex-end; }
}

/* Improve touch target on mobile */
@media (pointer: coarse) {
    .navbar { padding-block: 0.6rem; }
    .solde { min-height: 40px; }
}

/* Confetti styles */
.confetti-container{
    position: fixed;
    pointer-events: none;
    z-index: 2200;
    transform: translateX(-50%); /* le left du container correspond au centre visuel */
    overflow: visible;
}

/* pièce de confetti */
.confetti{
    position: absolute;
    top: 0;
    width: 8px;
    height: 12px;
    border-radius: 2px;
    display: block;
    will-change: transform, opacity;
    animation: confetti-fall 1.9s cubic-bezier(.2,.7,.2,1) forwards,
               confetti-rotate 1.9s linear forwards;
    transform-origin: 50% 50%;
}

/* translation horizontale / rotation contrôlées via variables */
@keyframes confetti-fall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translateY(260px) translateX(var(--tx, 0px)) rotate(var(--rot, 360deg));
        opacity: 0;
    }
}
@keyframes confetti-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(calc(var(--rot,360deg))); }
}

/* variantes pour taille / durée (donnent un effet plus dynamique) */
.confetti:nth-child(4n){ width:6px; height:10px; opacity:0.95; }
.confetti:nth-child(4n+1){ width:9px; height:13px; opacity:0.98; }
.confetti::after{ content:''; display:block; width:100%; height:100%; }

/* small navbar additions for the new link */
.nav-actions{
    display:inline-flex;
    align-items:center;
    gap:.7rem;
}
.nav-link{
    color:var(--color-secondary);
    text-decoration:none;
    font-weight:600;
    padding:.45rem .7rem;
    border-radius:999px;
    background: rgba(255,255,255,0.02);
    transition: background .16s, color .16s, transform .12s;
    white-space:nowrap;
    font-size:0.9rem;
}
.nav-link:hover{
    background: rgba(255,255,255,0.04);
    color:var(--color-primary);
    transform: translateY(-1px);
}

/* page how styling (simple) */
.how-page .card{
    border:1px solid rgba(255,255,255,0.04);
    box-shadow: var(--shadow-subtle);
}

/* HERO — titre seul, sans background ni décor */
.hero{
    width: min(1100px, 92%);
    margin: 1.75rem auto 0;
    display:flex;
    justify-content:center;
    padding: 0.5rem 0; /* espace vertical léger */
    background: transparent;
    box-shadow: none;
    border: none;
}

.hero-title{
    margin-top:1rem;
    margin-bottom: 0px;
    font-size: clamp(1.9rem, 9vw, 3rem); /* bien grand */
    font-weight:800;
    color: var(--accent);
    text-align:center;
    letter-spacing: -0.02em;
    text-shadow: none;
}

/* supprimer ancien .hero-inner styling si présent */
.hero-inner{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Mobile tweaks */
@media (max-width:420px){
    .hero{ margin-top:1rem; padding: .4rem 0; }
    .hero-title{ font-size: clamp(1.15rem, 8vw, 1.4rem); font-weight:700; }
}

/* HOW PAGE / ACCORDION */
.how-header h1{
  margin: .6rem 0 .15rem;
  font-size: clamp(1.15rem, 4.8vw, 1.6rem);
}
.how-header .muted{
  margin:0;
  color: var(--color-muted);
  font-size: .95rem;
}

/* simple card */
.how-intro.card{
  background: var(--bg-card);
  padding: .9rem;
  border-radius: 12px;
  margin-bottom: .9rem;
  color: var(--color-secondary);
  border: 1px solid rgba(255,255,255,0.04);
}

/* Accordion basics */
.how-accordion{ display:flex; flex-direction:column; gap:.65rem; margin-top:.6rem; }
.accordion{
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: var(--shadow-subtle);
}
.accordion summary{
  list-style:none;
  cursor:pointer;
  padding:.85rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  user-select:none;
}
.accordion summary span{ font-weight:600; font-size:1rem; color:var(--color-primary); }
.accordion summary i{
  font-size:1rem;
  color:var(--color-secondary);
  transition: transform .28s var(--transition-smooth);
  transform: rotate(0deg);
  display:inline-block;
  line-height:1;
}

/* rotate when open */
.accordion[open] summary i{ transform: rotate(180deg); color:var(--accent); }

/* panel */
.accordion .panel{
  padding: .9rem 1rem 1.1rem;
  color: var(--color-secondary);
  font-size: .95rem;
  line-height:1.45;
  border-top: 1px solid rgba(255,255,255,0.03);
}

/* compact lists */
.accordion .panel ul,
.accordion .panel ol{ margin:.45rem 0 .2rem 1rem; padding:0; }

/* link style inside */
.accordion a{ color: var(--accent); text-decoration: underline; }

/* mobile optimisations */
@media (max-width: 520px){
  .how-page{ padding-left: .8rem; padding-right: .8rem; }
  .accordion summary{ padding:.65rem .75rem; }
  .accordion .panel{ padding:.7rem .75rem; font-size:.95rem; }
  .how-intro.card{ padding:.7rem; font-size:.95rem; }
  .how-header h1{ font-size:1.15rem; margin-top:.4rem; }
}

/* reduce visual noise on very small screens */
@media (max-width: 360px){
  .how-accordion{ gap:.45rem; }
  .accordion summary span{ font-size:.98rem; }
  .accordion .panel{ font-size:.92rem; padding:.6rem .65rem; }
}

/* AUTH (login / register) styles to match site design */
.auth-page {
    max-width: 520px;
    margin: 2.2rem auto;
    padding: 1rem;
}
.auth-card{
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.15rem;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

/* form layout */
.auth-card h1{
    margin:0 0 .6rem 0;
    font-size:1.25rem;
    color:var(--color-primary);
}
.auth-card p.auth-sub{
    margin:0 0 0.9rem 0;
    color:var(--color-muted);
    font-size:0.93rem;
}

/* inputs */
.auth-card label{ display:block; margin:.45rem 0; color:var(--color-secondary); font-size:0.92rem; }
.auth-card input[type="email"],
.auth-card input[type="text"],
.auth-card input[type="password"]{
    width:100%;
    box-sizing:border-box;
    padding: .6rem .75rem;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.25);
    color:var(--color-primary);
    font-size:1rem;
    outline:none;
    transition: box-shadow .12s ease, border-color .12s ease, transform .06s;
    height:44px;
}
.auth-card input:focus{
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(155,109,255,0.06);
    transform: translateY(-1px);
}

/* error box */
.form-errors{
    background: rgba(255,10,10,0.04);
    border:1px solid rgba(255,10,10,0.08);
    color:#ffd1d1;
    padding:.6rem;
    border-radius:8px;
    margin-bottom:.8rem;
}

/* actions row */
.auth-actions{
    display:flex;
    gap:.6rem;
    align-items:center;
    justify-content:flex-start;
    margin-top:.6rem;
}
.auth-actions .contest-card__cta{
    padding: 0 .9rem;
    min-height:44px;
    height:44px;
    border-radius:10px;
    font-size:1rem;
}
.auth-actions a{ color:var(--color-secondary); text-decoration:none; font-size:.95rem; }

/* subtle foot note */
.auth-note{ margin-top:.6rem; font-size:0.85rem; color:var(--color-muted); }

/* Responsive tight */
@media (max-width:420px){
    .auth-card{ padding:.85rem; border-radius:12px; }
    .auth-card h1{ font-size:1.1rem; }
    .auth-actions{ flex-direction:column; align-items:stretch; gap:.45rem; }
    .auth-actions a{ text-align:center; }
    .auth-actions .contest-card__cta{ width:100%; }
}

/* Modern auth layout (no card) */
.auth-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 1.5rem;
    align-items: start;
    width: min(620px, 94%);
    margin: 2rem auto;
    padding: 0 1rem;
}

/* slogan: central and larger (main visual element) */
.auth-splash{ display:flex; align-items:center; justify-content:center; padding: 0.6rem; }
.auth-slogan{
    margin:0;
    font-size: clamp(2rem, 9vw, 3.4rem);
    font-weight: 900;
    color: var(--accent);
    text-align:center;
    line-height:1;
}

/* form grid: uniform spacing between labels and inputs */
.form-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.75rem; /* row-gap col-gap */
}
.form-row{ display:flex; flex-direction:column; gap:.4rem; margin:0; }
.label-text{ font-size:0.86rem; color:var(--color-secondary); }

/* make inputs full width of their grid cell and same height */
.form-grid input[type="email"],
.form-grid input[type="text"],
.form-grid input[type="tel"],
.form-grid input[type="password"]{
    width:100%;
    box-sizing:border-box;
    padding: .62rem .75rem;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.22);
    color:var(--color-primary);
    font-size:1rem;
    height:44px;
}

/* field-note small text under fields, same height reserve */
.field-note{ font-size:0.82rem; color:#cfcfcf; min-height:1.05em; }

/* actions */
.auth-actions{ display:flex; gap:.6rem; align-items:center; margin-top:.6rem; }
.auth-actions a{ color:var(--color-secondary); text-decoration:none; }

/* mobile: stack, center slogan above form, single column form */
@media (max-width: 820px){
    .auth-grid{ grid-template-columns: 1fr; gap: 1rem; padding: 0 0.8rem; }
    .auth-splash{ justify-content:center; padding: .2rem 0; order: 0; }
    .auth-slogan{ font-size: clamp(2rem, 8vw, 4rem); text-align:center; }
    .form-grid{ grid-template-columns: 1fr; }
    .auth-form{ order: 1; }
}

/* very small screens tweaks */
@media (max-width:420px){
    .auth-grid{ margin: 1rem auto; gap:.6rem; }
}

/* ensure consistent spacing for labels & inputs on desktop/mobile */
.auth-form h2{ margin:0 0 .4rem 0; font-size:1.05rem; color:var(--color-primary); }

/* Password strength bar */
.pw-strength {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.strength-bar {
  display: flex;
  gap: 4px;
  height: 4px;
  margin-top: 4px;
}

.strength-bar .segment {
  flex: 1;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Force states */
.strength-bar .segment.active.weak {
  background: #ff6b6b;
}
.strength-bar .segment.active.medium {
  background: #ffd166;
}
.strength-bar .segment.active.good {
  background: #06d6a0;
}
.strength-bar .segment.active.strong {
  background: #06d6a0;
}

/* Slightly darker tone for the highest level segment */
.strength-bar .segment-4.active.good,
.strength-bar .segment-4.active.strong {
  background: #06c290;
}

/* Make field note more compact since we have the bar */
.pw-strength .field-note {
  font-size: 0.75rem;
  min-height: 1em;
  text-align: right;
  margin-top: -2px;
}

/* Améliorations spécifiques au login/register */
.pw-input-group {
  position: relative;
  width: 100%;
}

.pw-input-group input {
  width: 100%;
  padding-right: 44px; /* espace pour le bouton */
}

.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.03);
  border: none;
  color: var(--color-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pw-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: var(--color-primary);
}

/* Validation visuelle */
.input-valid {
  border-color: rgba(6, 214, 160, 0.3) !important;
}

.input-error {
  border-color: rgba(255, 107, 107, 0.3) !important;
}

/* Ajustements auth-form pour le login */
.auth-form .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Amélioration du slogan sur mobile */
@media (max-width: 820px) {
  .auth-splash { 
    margin-bottom: 0.75rem;
  }
  .auth-slogan {
    font-size: clamp(1.8rem, 8vw, 3rem);
    background: linear-gradient(110deg, var(--accent) 30%, #c19bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
  }
}

/* Animation subtile pour le bouton submit quand il est actif */
.auth-actions .contest-card__cta:not([disabled]) {
  background-image: linear-gradient(110deg, var(--accent), #b48dff);
  animation: pulse-light 2s infinite alternate;
}

@keyframes pulse-light {
  0% { box-shadow: 0 0 0 0 rgba(155, 109, 255, 0.1); }
  100% { box-shadow: 0 0 0 8px rgba(155, 109, 255, 0); }
}

/* Auth buttons in navbar */
.auth-buttons {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-login {
  background: transparent;
  color: var(--color-secondary);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-login:hover {
  background: rgba(255,255,255,0.05);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-register {
  background: var(--accent);
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(155, 109, 255, 0.2);
}

.btn-register:hover {
  background: linear-gradient(to bottom, var(--accent), #a47bff);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(155, 109, 255, 0.3);
}

/* User chip when logged in */
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--color-secondary);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Harmonisation complète des éléments user-chip et solde */
.user-chip,
.solde {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 36px; /* Hauteur fixe identique */
    background: rgba(255,255,255,0.05);
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--color-secondary);
    border: 1px solid rgba(255,255,255,0.05);
    /* Assurer que tout est bien contenu sans déformer la hauteur */
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0; /* Empêcher de rétrécir plus petit que leur taille */
}

/* Style cohérent pour le contenu interne */
.user-chip span,
.solde span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
}

/* Différenciation visuelle subtile */
.solde i {
    color: var(--accent);
    font-size: 1rem; 
    line-height: 1;
}

/* Espacer les éléments correctement */
.user-chip {
    margin-right: 0.2rem;
}

/* Règles responsives harmonisées */
@media (max-width: 520px) {
    .user-chip,
    .solde {
        height: 32px; /* Même hauteur réduite */
        font-size: 0.88rem;
    }
    
    .user-chip span,
    .solde span {
        max-width: 50px;
    }
}

@media (max-width: 420px) {
    .user-chip,
    .solde {
        height: 30px; /* Même hauteur encore plus réduite */
        padding: 0 0.6rem;
        font-size: 0.85rem;
    }
    
    .user-chip span {
        max-width: 40px;
    }
    
    .solde span {
        max-width: 35px;
    }
    
    .solde i,
    .user-chip i {
        font-size: 0.95rem;
    }
}

/* Suppression des règles conflictuelles */
@media (max-width: 600px) {
    .navbar { padding: 0.45rem 0.6rem; gap: 0.45rem; }
    .logo { font-size: 0.98rem; }
    /* Retrait de la règle spécifique pour .solde ici */
}

@media (pointer: coarse) {
    .navbar { padding-block: 0.6rem; }
    /* Retrait de la règle min-height pour .solde */
}

/* user menu dropdown */
.nav-actions { position: relative; } /* ensure absolute children positioned relative to nav-actions */

.user-area { display:inline-flex; align-items:center; gap:0.6rem; position:relative; }

/* user-chip is a button already styled; ensure consistent height */
.user-chip {
  display:inline-flex;
  align-items:center;
  gap:0.45rem;
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 0 0.8rem;
  height: 36px;
  font-weight:600;
  color:var(--color-secondary);
  border:1px solid rgba(255,255,255,0.04);
  cursor:pointer;
}

/* dropdown */
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border-radius: 12px;
  overflow: hidden;
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 120;
}

/* open state */
.user-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* items */
.user-menu__item {
  display:block;
  padding: 0.6rem 0.9rem;
  color: var(--color-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  background: transparent;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.user-menu__item:hover,
.user-menu__item:focus {
  background: rgba(255,255,255,0.03);
  color: var(--color-primary);
}

/* logout button inside form should look like link */
.user-menu__logout {
  width:100%;
  border:none;
  background:transparent;
  cursor:pointer;
  font-family: inherit;
  text-align:left;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  color: var(--color-secondary);
}

/* ensure equal heights with solde */
.solde, .user-chip {
  height: 36px;
  line-height: 1;
}

/* Bouton gagner des tickets */
.earn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(155, 109, 255, 0.1);
    border: 1px solid rgba(155, 109, 255, 0.2);
    border-radius: 50%;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-left: 0.2rem;
}

.earn-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.earn-btn i {
    font-size: 1.2rem;
}

/* Responsive pour le bouton earn */
@media (max-width: 520px) {
    .earn-btn {
        width: 32px;
        height: 32px;
    }
    
    .earn-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .earn-btn {
        width: 30px;
        height: 30px;
        margin-left: 0.05rem;
    }
}

/* Bouton d'information sur le tirage */
.info-button-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0 3rem;
    padding: 0 1rem;
}

.info-button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(155, 109, 255, 0.08);
    color: var(--accent);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(155, 109, 255, 0.15);
    font-size: 0.95rem;
}

.info-button:hover {
    background: rgba(155, 109, 255, 0.15);
    transform: translateY(-2px);
}

.info-button i {
    font-size: 1.2rem;
}

/* Système de notifications */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 300px;
    max-width: calc(100vw - 40px);
}

.notification {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #4caf50;
}

.notification.error {
    border-left-color: #f44336;
}

.notification__icon {
    margin-right: 12px;
    font-size: 20px;
    color: var(--accent);
}

.notification.success .notification__icon {
    color: #4caf50;
}

.notification.error .notification__icon {
    color: #f44336;
}

.notification__content {
    flex: 1;
}

.notification__title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--color-primary);
}

.notification__message {
    font-size: 13px;
    color: var(--color-secondary);
}

.notification__close {
    background: none;
    border: none;
    color: var(--color-secondary);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    padding: 0;
    margin-left: 8px;
}

.notification__close:hover {
    opacity: 1;
}

/* Ajouter à la fin du fichier */

/* Style pour le lien alternatif sous le bouton principal */
.auth-alt-action {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.auth-alt-action a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.auth-alt-action a:hover {
    color: var(--accent);
}

/* Style pour la mention légale */
.legal-consent {
    margin: 1.2rem 0 1rem;
    text-align: center;
}

.legal-consent p {
    color: var(--color-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.legal-consent a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s;
}

.legal-consent a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .legal-consent {
        margin: 1rem 0 0.8rem;
    }
    
    .legal-consent p {
        font-size: 0.8rem;
    }
}
.ticket-btn--max {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(155, 109, 255, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 .23rem;
    margin-left: 0.5rem;
    height: 24px;
    transition: all 0.2s ease;
    display: none; /* Caché par défaut */
}

.ticket-btn--max:hover {
    background: rgba(155, 109, 255, 0.08);
    border-color: rgba(155, 109, 255, 0.5);
}

.ticket-btn--max:active {
    background: rgba(155, 109, 255, 0.15);
}

.ticket-btn--max:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Classe pour afficher le bouton */
.ticket-btn--max.show {
    display: inline-flex;
    align-items: center;
}