/* ===== VARIABLES CSS ===== */
:root {
  --primary-blue: #1b1d57;
  --secondary-blue: #282893;
  --light-blue: #2e2993;
  --accent-blue: #211ed3;
  --bright-blue: #030b66;
  --sky-blue: #1f2998;
  --primary-yellow: #f7f136;
  --secondary-yellow: #8d7e10;
  --gold-yellow: #f0ff4f;
  --light-gold: #ffca28;
  --pure-gold: #ffd700;
  --orange-gold: #ffb300;
  --primary-green: #cb3412;
  --bright-green: #ddda0b;
  --primary-purple: #b628cf;
  --secondary-purple: #713cce;
  --white: #fff;
  --black: #000;
}

/* ===== RESET ET BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Arial";
  src: url("arial.otf") format("otf");
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--light-blue) 50%,
    #7986cb 100%
  );
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== VERSION DESKTOP (1200px et plus) ===== */
@media (min-width: 1200px) {
  .header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 130px;
    min-height: 130px;
    background: linear-gradient(
      135deg,
      var(--accent-blue) 0%,
      var(--bright-blue) 50%,
      var(--sky-blue) 100%
    );
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    overflow: hidden;
    z-index: 2000;
    backdrop-filter: blur(10px);
  }

  .left-section {
    display: flex;
    align-items: center;
    gap: 30px;
    z-index: 2;
  }

  .avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 6px;
    /* Encadré statut en ligne */
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2),
      0 0 0 6px rgba(0, 0, 0, 0.2);
  }

  .avatar-container.online {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.85),
      0 0 0 6px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(76, 175, 80, 0.4);
  }

  .avatar-container.offline {
    box-shadow: 0 0 0 3px rgba(158, 158, 158, 0.85),
      0 0 0 6px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(158, 158, 158, 0.4);
  }

  .avatar-container.en-jeu {
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.85),
      0 0 0 6px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(255, 152, 0, 0.4);
  }

  /* Cacher le statut si confidentialité = privé */
  .avatar-container.hidden-status {
    box-shadow: 0 0 0 3px rgba(158, 158, 158, 0.35),
      0 0 0 6px rgba(0, 0, 0, 0.2);
  }

  /* S'assurer que les avatars ont le même style interne */
  .avatar-container .avatar {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
    font-family: Arial, Helvetica, sans-serif;
  }

  .avatar {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
  }

  .player-name {
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
  }

  .stats-container {
    display: flex;
    gap: 16px;
  }

  .stat-item {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid var(--light-blue);
    border-radius: 28px;
    padding: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
  }

  .xp-icon {
    width: 28px;
    width: 35px;
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--secondary-purple) 100%
    );
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    color: white;
    box-shadow: 0 3px 10px rgba(156, 39, 176, 0.6);
  }

  .stat-value {
    color: var(--white);
    font-weight: 900;
    font-size: 18px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-family: Arial, Helvetica, sans-serif;
  }

  .right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 2;
  }

  .btn {
    position: relative;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 900;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.85);
    font-family: Arial, Helvetica, sans-serif;
  }

  .main-action-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 40px 0 32px 0;
  }

  .succes-btn {
    width: 70%;
    height: 280px;
    font-size: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(
      145deg,
      var(--primary-yellow) 20%,
      var(--secondary-yellow) 100%
    );

    color: var(--black);
    border: 4px solid rgba(255, 255, 255, 0.85);
    transition: all 0.2s;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
  }

  .main-action-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 0;
    background: rgba(44, 62, 80, 0.12);
    border-radius: 8px 8px 0 0;
    padding: 0;
    /* SUPPRIMÉ: overflow: hidden; - Cela empêchait le scroll de fonctionner */
    width: 85%;
    margin: 0 auto;
    position: sticky;
    top: 130px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  }

  .tab-btn {
    flex: 1;
    height: 60px;
    font-size: 17px;
    border-radius: 6px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: none;
    background: linear-gradient(
      145deg,
      var(--primary-yellow) 0%,
      var(--secondary-yellow) 100%
    );
    color: var(--black);

    transition: all 0.3s ease;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    border: 4px solid rgba(255, 255, 255, 0.85);
    margin: 0 8px;
  }

  .tab-btn:first-child {
    margin-left: 0;
  }

  .tab-btn:last-child {
    margin-right: 0;
  }

  .tab-btn.active {
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--light-blue) 100%
    );
    color: var(--white);
    box-shadow: none;
    transform: none;
    z-index: 2;
  }

  .main-tab-content {
    width: 95%;
    margin: 0 auto 36px auto;
    min-height: 140px;
    background: rgba(44, 62, 80, 0.25);
    border-radius: 0 0 7px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    padding-bottom: 100px;
    text-align: center;
  }

  .tab-content {
    display: none;
    width: 100%;
    height: 100%;
  }

  .tab-content.active {
    display: block;
  }

  .footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(
      135deg,
      var(--accent-blue) 0%,
      var(--bright-blue) 50%,
      var(--sky-blue) 100%
    );
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 10;
  }

  .jouer-btn {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    font-size: 32px;
    padding: 0;
    border-radius: 8px;
    margin: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 16px 48px rgba(22, 155, 55, 0.18),
      0 4px 16px var(--light-blue);
    border: 4px solid rgba(255, 255, 255, 0.85);
  }

  .jouer-btn {
    position: relative;
    top: -36px;
    z-index: 20;
    background: linear-gradient(
      145deg,
      var(--primary-green) 0%,
      var(--bright-green) 100%
    );
    color: var(--white);
    border: none;
    box-shadow: 0 16px 48px rgba(22, 155, 55, 0.18),
      0 4px 16px var(--light-blue);
    border: 4px solid rgba(255, 255, 255, 0.85);
  }

  .level-indicator {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--secondary-purple) 100%
    );
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  }
}

/* ===== VERSION TABLETTE (768px à 1199px) ===== */
@media (min-width: 768px) and (max-width: 1199px) {
  .header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 110px;
    min-height: 110px;
    background: linear-gradient(
      135deg,
      var(--accent-blue) 0%,
      var(--bright-blue) 50%,
      var(--sky-blue) 100%
    );
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    overflow: hidden;
    z-index: 2000;
    backdrop-filter: blur(10px);
  }

  .left-section {
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 2;
  }

  .avatar-container {
    position: relative;
    width: 75px;
    height: 75px;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  .avatar-container.online {
    box-shadow: 0 7px 22px rgba(76, 175, 80, 0.4);
  }

  .avatar-container.offline {
    box-shadow: 0 7px 22px rgba(158, 158, 158, 0.4);
  }

  .avatar-container.en-jeu {
    box-shadow: 0 7px 22px rgba(255, 152, 0, 0.4);
  }

  /* S'assurer que les avatars ont le même style interne */
  .avatar-container .avatar {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
  }

  .avatar {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
  }

  .player-name {
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
  }

  .stats-container {
    display: flex;
    gap: 14px;
  }

  .stat-item {
    display: flex;
    gap: 9px;
    background: linear-gradient(
      145deg,
      var(--secondary-blue) 0%,
      var(--primary-blue) 100%
    );
    border: 3px solid var(--light-blue);
    border-radius: 26px;
    padding: 6px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
  }

  .xp-icon {
    width: 26px;
    width: 35px;
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--secondary-purple) 100%
    );
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: white;
    box-shadow: 0 2px 9px rgba(156, 39, 176, 0.6);
  }

  .stat-value {
    color: var(--white);
    font-weight: 900;
    font-size: 17px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-family: Arial, Helvetica, sans-serif;
  }

  .right-section {
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 2;
  }

  .btn {
    position: relative;
    padding: 14px 28px;
    border: none;
    border-radius: 7px;
    font-weight: 900;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.2), 0 10px 22px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.85);
    font-family: Arial, Helvetica, sans-serif;
  }

  .main-action-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 36px 0 28px 0;
  }

  .succes-btn {
    width: 70%;
    height: 280px;
    font-size: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(
      145deg,
      var(--primary-yellow) 20%,
      var(--secondary-yellow) 100%
    );
    color: var(--black);
    border: 4px solid rgba(255, 255, 255, 0.85);
    transition: all 0.2s;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
  }

  .main-action-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 0;
    background: rgba(44, 62, 80, 0.12);
    border-radius: 7px 7px 0 0;
    padding: 0;
    /* SUPPRIMÉ: overflow: hidden; - Cela empêchait le scroll de fonctionner */
    width: 88%;
    margin: 0 auto;
    position: sticky;
    top: 110px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  }

  .tab-btn {
    flex: 1;
    height: 60px;
    font-size: 17px;
    border-radius: 6px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: none;
    background: linear-gradient(
      145deg,
      var(--primary-yellow) 0%,
      var(--secondary-yellow) 100%
    );
    color: var(--black);

    transition: all 0.3s ease;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    border: 4px solid rgba(255, 255, 255, 0.85);
    margin: 0 8px;
  }

  .tab-btn:first-child {
    margin-left: 0;
  }

  .tab-btn:last-child {
    margin-right: 0;
  }

  .tab-btn.active {
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--light-blue) 100%
    );
    color: var(--white);
    box-shadow: none;
    transform: none;
    z-index: 2;
  }

  .main-tab-content {
    width: 95%;
    margin: 0 auto 36px auto;
    min-height: 140px;
    background: rgba(44, 62, 80, 0.25);
    border-radius: 0 0 7px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    padding-bottom: 100px;
    text-align: center;
  }

  .tab-content {
    display: none;
    width: 100%;
    height: 100%;
  }

  .tab-content.active {
    display: block;
  }

  .footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(
      135deg,
      var(--accent-blue) 0%,
      var(--bright-blue) 50%,
      var(--sky-blue) 100%
    );
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 10;
    padding: 0 10px;
  }

  .jouer-btn {
    width: 110px;
    height: 110px;
    min-width: 110px;
    min-height: 110px;
    font-size: 30px;
    padding: 0;
    border-radius: 7px;
    margin: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 48px rgba(22, 155, 55, 0.18),
      0 4px 16px var(--light-blue);
    position: relative;
    top: -32px;
    z-index: 20;
    background: linear-gradient(
      145deg,
      var(--primary-green) 0%,
      var(--bright-green) 100%
    );
    color: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.85);
  }

  .level-indicator {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--secondary-purple) 100%
    );
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    border: 4px solid rgba(255, 255, 255, 0.85);
  }
}

/* ===== VERSION MOBILE (moins de 768px) ===== */
@media (max-width: 767px) {
  .header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 90px;
    min-height: 90px;
    background: linear-gradient(
      135deg,
      var(--accent-blue) 0%,
      var(--bright-blue) 50%,
      var(--sky-blue) 100%
    );
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    overflow: hidden;
    z-index: 2000;
    backdrop-filter: blur(10px);
  }

  .left-section {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
  }

  .avatar-container {
    position: relative;
    width: 60px;
    height: 60px;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  .avatar-container.online {
    box-shadow: 0 5px 18px rgba(76, 175, 80, 0.4);
  }

  .avatar-container.offline {
    box-shadow: 0 5px 18px rgba(158, 158, 158, 0.4);
  }

  .avatar-container.en-jeu {
    box-shadow: 0 5px 18px rgba(255, 152, 0, 0.4);
  }

  /* S'assurer que les avatars ont le même style interne */
  .avatar-container .avatar {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
  }

  .avatar {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
  }

  .player-name {
    color: var(--white);
    font-size: 16px;
    font-weight: 900;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
  }

  .stats-container {
    display: flex;
    gap: 10px;
  }

  .stat-item {
    display: flex;
    gap: 6px;
    background: linear-gradient(
      145deg,
      var(--secondary-blue) 0%,
      var(--primary-blue) 100%
    );
    border: 2px solid var(--light-blue);
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
  }

  .xp-icon {
    width: 20px;
    width: 35px;
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--secondary-purple) 100%
    );
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    color: white;
    box-shadow: 0 1px 6px rgba(156, 39, 176, 0.6);
  }

  .stat-value {
    color: var(--white);
    font-weight: 900;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-family: Arial, Helvetica, sans-serif;
  }

  .right-section {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
  }

  .btn {
    position: relative;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.85);
    font-family: Arial, Helvetica, sans-serif;
  }

  .main-action-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 24px 0 20px 0;
  }

  .succes-btn {
    width: 90%;
    height: 200px;
    font-size: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(
      145deg,
      var(--primary-yellow) 20%,
      var(--secondary-yellow) 100%
    );
    border: 4px solid rgba(255, 255, 255, 0.85);
    color: var(--black);

    transition: all 0.2s;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
  }

  .main-action-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 0;
    background: rgba(44, 62, 80, 0.12);
    border-radius: 6px 6px 0 0;
    padding: 0;
    /* SUPPRIMÉ: overflow: hidden; - Cela empêchait le scroll de fonctionner */
    width: 95%;
    margin: 0 auto;
    position: sticky;
    top: 90px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  }

  .tab-btn {
    flex: 1;
    height: 60px;
    font-size: 17px;
    border-radius: 6px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: none;
    background: linear-gradient(
      145deg,
      var(--primary-yellow) 0%,
      var(--secondary-yellow) 100%
    );
    color: var(--black);

    transition: all 0.3s ease;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    border: 4px solid rgba(255, 255, 255, 0.85);
    margin: 0 8px;
  }

  .tab-btn:first-child {
    margin-left: 0;
  }

  .tab-btn:last-child {
    margin-right: 0;
  }

  .tab-btn.active {
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--light-blue) 100%
    );
    color: var(--white);
    box-shadow: none;
    transform: none;
    z-index: 2;
  }

  .main-tab-content {
    width: 95%;
    margin: 0 auto 36px auto;
    min-height: 140px;
    background: rgba(44, 62, 80, 0.25);
    border-radius: 0 0 7px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    padding-bottom: 100px;
    text-align: center;
  }

  .tab-content {
    display: none;
    width: 100%;
    height: 100%;
  }

  .tab-content.active {
    display: block;
  }

  .footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(
      135deg,
      var(--accent-blue) 0%,
      var(--bright-blue) 50%,
      var(--sky-blue) 100%
    );
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 10;
    padding: 0 10px;
  }

  .jouer-btn {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    font-size: 24px;
    padding: 5px;
    border-radius: 6px;
    margin: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 48px rgba(22, 155, 55, 0.18),
      0 4px 16px var(--light-blue);
    position: relative;
    top: -24px;
    z-index: 20;
    background: linear-gradient(
      145deg,
      var(--primary-green) 0%,
      var(--bright-green) 100%
    );
    color: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.85);
  }

  .level-indicator {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: linear-gradient(
      145deg,
      var(--primary-purple) 0%,
      var(--secondary-purple) 100%
    );
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  }
}

/* ===== STYLES COMMUNS ===== */
.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.header .stats-container .stat-item {
  background: linear-gradient(
    145deg,
    var(--primary-purple) 0%,
    var(--light-blue) 100%
  );
  border: none;
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.06),
    inset 0 -2px 10px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.25);
}
.header .stats-container .stat-item .xp-icon {
  background: linear-gradient(
    145deg,
    var(--primary-purple),
    var(--secondary-purple)
  );
  width: 35px;
  height: 22px;
  font-size: 12px;
}
.header .stats-container .stat-item .stat-value {
  color: var(--white);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.avatar-container:hover {
  transform: scale(1.05);
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.btn:hover:not(.tab-btn) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2), 0 12px 25px rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stats-btn {
  background: linear-gradient(
    145deg,
    var(--primary-green) 0%,
    var(--bright-green) 100%
  );
  color: white;
  border: 4px solid rgba(255, 255, 255, 0.85);
}

#notificationBtn {
  background: linear-gradient(
    145deg,
    var(--primary-green) 0%,
    var(--bright-green) 100%
  );
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

footer .btn {
  background: linear-gradient(
    145deg,
    var(--bright-green) 0%,
    var(--primary-green) 100%
  );
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.succes-btn:hover {
  background: linear-gradient(
    145deg,
    var(--primary-yellow) 0%,
    var(--secondary-yellow) 100%
  );
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 16px 48px rgba(22, 155, 55, 0.18),
    0 4px 16px var(--light-blue);
}

.jouer-btn:hover {
  background: linear-gradient(
    145deg,
    var(--bright-green) 0%,
    var(--primary-green) 100%
  );
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 16px 48px rgba(22, 155, 55, 0.18),
    0 4px 16px var(--light-blue);
}

@keyframes pulse-badge {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.glow-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%);
  animation: glow 6s infinite;
}

/* ===== UNIFICATION AVATAR (toutes tailles) ===== */
/* Forcer le même anneau d'état (online/offline) en desktop/tablette/mobile */
.avatar-container {
  border-radius: 6px !important;
}
.avatar-container.online {
  box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.95),
    0 8px 22px rgba(76, 175, 80, 0.35) !important;
}
.avatar-container.offline {
  box-shadow: 0 0 0 6px rgba(158, 158, 158, 0.8),
    0 8px 22px rgba(158, 158, 158, 0.3) !important;
}
.avatar-container.en-jeu {
  box-shadow: 0 0 0 6px rgba(255, 152, 0, 0.95),
    0 8px 22px rgba(255, 152, 0, 0.35) !important;
}
.avatar-container.hidden-status {
  box-shadow: none !important;
}

@keyframes glow {
  0% {
    transform: translateX(-200%);
  }
  50% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(200%);
  }
}

img {
  max-width: 100%;
  height: auto;
  color: rgb(0, 0, 0);
  filter: brightness(0) invert(1);
}

/* Styles pour l'upgrade inline dans l'onglet amis */
.upgrade-content-inline {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
  margin: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.upgrade-content-inline .upgrade-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}

.upgrade-content-inline h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #fff;
}

.upgrade-content-inline p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  opacity: 0.9;
}

.upgrade-content-inline .upgrade-features {
  margin: 25px 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.upgrade-content-inline .feature-item {
  padding: 8px 0;
  font-size: 1rem;
  opacity: 0.95;
}

.upgrade-content-inline .btn-upgrade {
  background: linear-gradient(45deg, #ff6b6b, #feca57);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.upgrade-content-inline .btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.upgrade-content-inline .btn-upgrade i {
  margin-right: 8px;
}

/* Styles pour les textes de statut dans les cartes du classement */
.status-text {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.75);
}

/* Colorer le texte avec l'état de l'avatar via voisin immédiat */
.avatar-container.online + * .status-text {
  color: #0bdd20;
}

.avatar-container.en-jeu + * .status-text {
  color: #ff8c00; /* Orange comme l'anneau "en-jeu" */
}

/* ===== ANIMATIONS ===== */

/* ===== BADGE DE NOTIFICATION ===== */
.notification-btn-wrapper {
  position: relative;
  display: inline-block;
  overflow: visible; /* Assure que le badge reste visible même en débordement */
}

.notifications-link {
  position: relative;
  overflow: visible;
}

.notif-badge,
#notificationBadge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e02424;
  color: #fff;
  border-radius: 50%;
  padding: 2px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  border: 2px solid white;
  line-height: 1.2;
  text-align: center;
  z-index: 9999;
  pointer-events: none; /* Le clic passe au bouton parent */
  transform: translate(0, 0); /* Force un nouveau contexte de stacking */
}

/* ==================== TOAST NOTIFICATIONS ==================== */

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.notification-toast {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  max-width: 350px;
  min-width: 280px;
  pointer-events: all;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 4px solid;
  position: relative;
}

.notification-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-toast.hide {
  transform: translateX(100%);
  opacity: 0;
}

.notification-toast.toast-success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.notification-toast.toast-success::before {
  content: "✅";
  font-size: 18px;
  margin-right: 4px;
}

.notification-toast.toast-error {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2, #fef1f1);
}

.notification-toast.toast-error::before {
  content: "❌";
  font-size: 18px;
  margin-right: 4px;
}

.notification-toast.toast-info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
}

.notification-toast.toast-info::before {
  content: "ℹ️";
  font-size: 18px;
  margin-right: 4px;
}

.toast-content {
  flex: 1;
  font-weight: 500;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .notification-toast {
    max-width: none;
    min-width: auto;
    margin: 0;
  }
}
.stat-item {
  display: flex;
  gap: 6px;
  background: linear-gradient(
    145deg,
    var(--secondary-blue) 0%,
    var(--primary-blue) 100%
  );
  border: 2px solid var(--light-blue);
  border-radius: 20px;
  padding: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  align-items: center;
}
