/* style.css */

/* 1. LE FOND DE LA PAGE */
body {
    background-color: #280130 !important;
    color: white;
    margin: 0;
    padding: 10px 20px 20px 20px;
}

.container {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
}

#bingo-grid-editor {
    border: 2px solid black;
    background-color: black;
    gap: 2px;
}

.bingo-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid black;
    padding: 4px;
    height: 120px;
    overflow: hidden; /* Important : coupe ce qui dépasse vraiment trop */
    position: relative;
    color: black;
    font-weight: bold;
}

/* --- IMAGE FLEXIBLE --- */
.bingo-cell img {
    width: 100%;
    
    /* On change 'height: 60px' par ça : */
    max-height: 60px; /* Taille max souhaitée */
    height: auto;     /* S'adapte */
    min-height: 0;    /* Autorise l'image à disparaître si besoin */
    flex-shrink: 1;   /* Autorise le rétrécissement */
    
    object-fit: contain;
    margin-bottom: 4px;
}

.bingo-cell textarea {
    width: 100%;
    text-align: center;
    border: none;
    outline: none;
    font-size: 0.75rem;
    line-height: 1rem;
    
    /* On laisse le texte pousser */
    flex-shrink: 0; 
    
    padding: 2px 0;
    margin: 0;
    resize: none;
    background-color: transparent;
    color: black;
    font-weight: 600;
    
    /* Pour éviter la barre de scroll moche */
    overflow: hidden; 
}

.bingo-cell textarea::placeholder {
    color: rgba(0, 0, 0, 0.6);
    opacity: 1;
}

.bingo-cell input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- MODIFICATIONS POUR LES BOUTONS IONICONS --- */

/* Bouton Upload (Images) */
.bingo-cell .upload-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    
    /* Style du bouton */
    background-color: rgba(0, 0, 0, 0.6); /* Noir semi-transparent */
    color: white;
    
    /* Taille et centrage */
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex; /* Important pour centrer l'icône */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 1px solid white;
    
    /* Taille de l'icône */
    font-size: 1.1rem; 
    transition: background-color 0.2s;
}

.bingo-cell .upload-btn:hover {
    background-color: black;
}

/* Bouton Supprimer (Croix) */
.bingo-cell .remove-img-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    
    /* --- COULEUR DE BASE --- */
    background-color: #EF4444; /* Un rouge plus vif (Tailwind Red 500) */
    color: white; 
    
    /* Transition pour l'effet de survol */
    transition: background-color 0.2s ease;
    
    /* Taille et centrage (modifié précédemment) */
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: none; 
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 1px solid black;
    
    font-size: 1rem;
    padding: 0;

    /* Au premier plan */
    z-index: 10;
}

/* --- AJOUT : EFFET AU SURVOL (HOVER) --- */
.bingo-cell .remove-img-btn:hover {
    background-color: #B91C1C; /* Rouge foncé quand on passe la souris dessus */
    border-color: white; /* Petit détail : la bordure devient blanche */
}

.free-space {
    background-color: black !important;
    color: white !important;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
}

.free-space textarea {
    background-color: black !important;
    color: white !important;
    flex-grow: 0;
    height: auto;
}

.free-space textarea::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

