/* ==========================================================================
   CSS DÉDIÉ : PENDU.PHP - Le Jeu du Pendu
   Fichier : css/pendu.css
   École de l'Enfant-Jésus - Morlanwelz
   ========================================================================== */

/* Style propre au Jeu du Pendu */
  .pendu-container {
    max-width: 900px;
    margin: 0 auto 30px auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 3px solid #ffde59;
  }

  .theme-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
  }

  .theme-btn {
    background-color: #f0f8ff;
    border: 2px solid #62d0ff;
    color: #2c3e50;
    padding: 10px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Fredoka', 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .theme-btn:hover {
    background-color: #e0f2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 208, 255, 0.3);
  }

  .theme-btn.active {
    background: linear-gradient(135deg, #62d0ff 0%, #3a86ff 100%);
    color: white;
    border-color: #3a86ff;
    box-shadow: 0 6px 15px rgba(58, 134, 255, 0.4);
  }

  .game-area {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: center;
  }

  @media screen and (max-width: 768px) {
    .game-area {
      grid-template-columns: 1fr;
    }
  }

  /* Canvas / SVG Dessin du pendu */
  .hangman-stage {
    background: linear-gradient(180deg, #eef9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    border: 2px solid #bae6fd;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
  }

  .hangman-svg {
    width: 200px;
    height: 220px;
  }

  /* Zone centrale du jeu */
  .play-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .stats-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    background-color: #fffde7;
    border: 2px dashed #ffde59;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    box-sizing: border-box;
  }

  .lives-container {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 18px;
  }

  .clue-box {
    background-color: #f3e8ff;
    border: 2px solid #d8b4fe;
    color: #6b21a8;
    padding: 10px 18px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fadeIn 0.4s ease;
  }

  /* Affichage des lettres masquées */
  .word-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
    min-height: 55px;
  }

  .letter-slot {
    width: 42px;
    height: 50px;
    border-bottom: 4px solid #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    text-transform: uppercase;
    transition: all 0.2s ease;
    font-family: 'Fredoka', sans-serif;
  }

  .letter-slot.space {
    border-bottom: none;
    width: 20px;
  }

  .letter-slot.revealed {
    color: #2563eb;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  /* Clavier AZERTY sur écran */
  .keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 500px;
  }

  .keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .key-btn {
    width: 38px;
    height: 42px;
    border: 2px solid #cbd5e1;
    background-color: #ffffff;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 0 #cbd5e1;
    font-family: 'Fredoka', sans-serif;
  }

  .key-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #94a3b8;
  }

  .key-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #94a3b8;
  }

  .key-btn.correct {
    background-color: #4ade80;
    border-color: #22c55e;
    color: white;
    box-shadow: 0 3px 0 #16a34a;
    cursor: default;
  }

  .key-btn.wrong {
    background-color: #f87171;
    border-color: #ef4444;
    color: white;
    box-shadow: 0 3px 0 #dc2626;
    opacity: 0.6;
    cursor: default;
  }

  .key-btn:disabled {
    cursor: default;
  }

  /* Bouton d'action / Rejouer */
  .action-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
  }

  .btn-action {
    background: linear-gradient(135deg, #ffde59 0%, #ffcf25 100%);
    color: #2c3e50;
    border: 2px solid #ebd03f;
    padding: 10px 22px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 207, 37, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fredoka', sans-serif;
  }

  .btn-action:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 15px rgba(255, 207, 37, 0.6);
  }

  /* Overlay de fin de partie (Victoire / Défaite) */
  .game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .game-modal.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .modal-card {
    background: white;
    border-radius: 28px;
    padding: 30px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid #ffde59;
  }

  .game-modal.visible .modal-card {
    transform: scale(1);
  }

  .modal-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
  }

  .modal-word {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
    margin: 15px 0;
    letter-spacing: 2px;
    background: #eff6ff;
    padding: 10px;
    border-radius: 12px;
    border: 2px dashed #93c5fd;
  }

  .modal-text {
    font-size: 15px;
    color: #475569;
    margin-bottom: 20px;
  }

  @keyframes popIn {
    0% { transform: scale(0.3); opacity: 0; }
    80% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
