* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body.bgimg {
    background-image: url('../img/bgmatrix.png');
    min-height: 100%;
    background-position: center;
    background-size: cover;
    }
    body {
      font-family: Arial, sans-serif;
      background: #f0f4f8;
    }

    header {
      background: #2c3e50;
      color: white;
      padding: 20px;
      text-align: center;
    }

    header h1 {
      font-size: 2.5em;
      margin-bottom: 10px;
    }

    header p {
      font-size: 1.2em;
      opacity: 0.9;
    }

    .container {
      max-width: 1000px;
      margin: 50px auto;
      padding: 20px;
    }

    .intro {
      background: white;
      padding: 30px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      text-align: center;
      margin-bottom: 40px;
    }

    .intro h2 {
      color: #2c3e50;
      margin-bottom: 15px;
    }

    .intro p {
      color: #555;
      line-height: 1.6;
      font-size: 1.1em;
    }

    .categories {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 20px;
    }

    .card {
      background: white;
      padding: 25px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      text-align: center;
      transition: transform 0.3s;
    }

    .card:hover {
      transform: translateY(-5px);
      box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }

    .card-icon {
      font-size: 3em;
      margin-bottom: 15px;
    }

    .card h3 {
      color: #2c3e50;
      margin-bottom: 10px;
    }

    .card p {
      color: #666;
      line-height: 1.5;
    }

    .card a {
      display: inline-block;
      margin-top: 15px;
      padding: 10px 20px;
      background: #3498db;
      color: white;
      text-decoration: none;
      border-radius: 5px;
      transition: background 0.3s;
    }

    .card a:hover {
      background: #2980b9;
    }

    footer {
      background: #2c3e50;
      color: white;
      text-align: center;
      padding: 20px;
      margin-top: 50px;
    }
    input[type=text]{
    display:block;
        margin:auto;
    }
    input[type=submit]{
        

        background-color: #2c3e50;
        border: none;
        color: white;
        padding: 10px 16px;
        text-decoration: none;
        margin: 4px 2px;
        cursor: pointer;
    }

    .lien-desactive {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999;
    text-decoration: none;
    }

    /* Début Pour le tampon quand la réponse est fausse */
    .stamp {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-15deg) scale(0);
            width: 300px;
            height: 150px;
            border: 8px solid #dc3545;
            border-radius: 15px;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            pointer-events: none;
            z-index: 1000;
        }

        .stamp.show {
            animation: stampAppear 0.6s ease-out forwards;
        }

        .stamp-text {
            font-size: 72px;
            font-weight: bold;
            color: #dc3545;
            text-transform: uppercase;
            letter-spacing: 8px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        }

        @keyframes stampAppear {
            0% {
                transform: translate(-50%, -50%) rotate(-15deg) scale(0);
                opacity: 0;
            }
            60% {
                transform: translate(-50%, -50%) rotate(-15deg) scale(1.2);
                opacity: 0.9;
            }
            100% {
                transform: translate(-50%, -50%) rotate(-15deg) scale(1);
                opacity: 0.85;
            }
        }

      
  /*Fin Pour le tampon quand la réponse est fausse */

  /* CSS POUR LA FIN DU JEU */
/* Conteneur principal */
.endgame-screen {
  background: linear-gradient(135deg, #2c3e50, #3a0066);
  color: white;
  text-align: center;
  padding: 60px 30px;
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
  animation: fadeIn 1.2s ease-out forwards;
  transform: translateY(20px);
  opacity: 0;
}

/* Titre de fin de jeu */
.endgame-screen h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffcc00, #ff0077);
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: 3px;
  animation: glowText 2s infinite alternate;
}

/* Message de description */
.endgame-screen p {
  font-size: 1.4rem;
  opacity: 0.9;
  animation: fadeInText 2s ease-out backwards 0.5s;
}

/* Animations */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowText {
  0% { text-shadow: 0 0 10px #ffcc00; }
  100% { text-shadow: 0 0 25px #ff0077; }
}

@keyframes fadeInText {
  from { opacity: 0; }
  to { opacity: 1; }
}

  
/* END  CSS POUR LA FIN DU JEU */

/*---- MODAL ------ */
/* Modal styles */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            animation: fadeIn 0.3s ease;
        }

        .modal-overlay.active {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .modal {
            background: white;
            border-radius: 20px;
            padding: 40px;
            max-width: 600px;
            width: 90%;
            position: relative;
            animation: slideUp 0.4s ease;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        }

        .modal-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #667eea;
        }

        .modal-icon {
            font-size: 2.5em;
            margin-right: 15px;
        }

        .modal-title {
            color: #667eea;
            font-size: 1.8em;
            font-weight: bold;
        }

        .modal-content {
            color: #333;
            line-height: 1.8;
            font-size: 1.1em;
            margin-bottom: 30px;
        }

        .modal-buttons {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }
        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .btn-close {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .btn-close:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        

        .close-x {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 2em;
            color: #999;
            cursor: pointer;
            line-height: 1;
            transition: color 0.3s ease;
        }

        .close-x:hover {
            color: #333;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
/*---- FIN    MODAL ------ */

/* ---- Pour l'affichage des points ----- */

/* Style général pour le conteneur de points */
        .points-container {
            display: inline-block;
            padding: 10px 10px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
            animation: slideInScale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            position: relative;
            overflow: hidden;
        }

        @keyframes slideInScale {
            0% {
                opacity: 0;
                transform: translateY(-30px) scale(0.8);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .points-container::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                45deg,
                transparent,
                rgba(255, 255, 255, 0.3),
                transparent
            );
            animation: shine 2s infinite;
            animation-delay: 0.8s;
        }

        @keyframes shine {
            0% {
                transform: translateX(-100%) translateY(-100%) rotate(45deg);
            }
            100% {
                transform: translateX(100%) translateY(100%) rotate(45deg);
            }
        }

        .points-value {
            font-size: 2.5em;
            font-weight: bold;
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
            animation: popIn 0.5s ease-out 0.3s both;
            display: inline-block;
        }

        @keyframes popIn {
            0% {
                opacity: 0;
                transform: scale(0);
            }
            50% {
                transform: scale(1.2);
            }
            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        .points-pulse {
            animation: pulse 2s ease-in-out infinite;
        }

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

        .points-label {
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.9);
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-right: 10px;
            animation: fadeIn 0.8s ease-out 0.2s both;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .points-bronze {
            background: linear-gradient(135deg, #cd7f32 0%, #8b5a2b 100%);
        }

        .points-silver {
            background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
        }

        .points-gold {
            background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
        }

        .points-platinum {
            background: linear-gradient(135deg, #e5e4e2 0%, #a0b2c6 100%);
        }

        .points-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 25px;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            border-radius: 50px;
            animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
        }

        @keyframes bounceIn {
            0% {
                opacity: 0;
                transform: scale(0.3);
            }
            50% {
                transform: scale(1.05);
            }
            70% {
                transform: scale(0.9);
            }
            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        