/* Style général */
.pyramide-game {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    padding: 20px;
    position: relative;
}

.pyramide-header {
    text-align: center;
    margin-bottom: 30px;
}

.pyramide-header h2 {
    font-size: 2.2em;
    color: #3a3a3a;
    margin-bottom: 5px;
}

.pyramide-date {
    font-size: 1.2em;
    color: #777;
    font-style: italic;
}

/* Grille de la pyramide */
.pyramide-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.pyramide-grid {
    width: 55%;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pyramide-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.pyramide-cell {
    width: 42px;
    height: 42px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 6px;
    margin: 0 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pyramide-cell.filled {
    background-color: #4CAF50;
    color: white;
    border-color: #388E3C;
    transform: scale(1.05);
}

.pyramide-cell.first-letter {
    background-color: #2196F3;
    color: white;
    border-color: #1565C0;
}

/* Interface de jeu */
.pyramide-interface {
    width: 40%;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pyramide-definition {
    margin-bottom: 25px;
}

.pyramide-definition h3 {
    font-size: 1.4em;
    color: #3a3a3a;
    margin-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
}

#pyramide-current-definition {
    font-size: 1.1em;
    line-height: 1.5;
    color: #555;
    font-style: italic;
}

.pyramide-progress {
    margin-bottom: 25px;
}

.progress-bar {
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 0.9em;
    color: #777;
}

.pyramide-input-container {
    display: flex;
    margin-bottom: 20px;
    width: 100%;
    flex-wrap: nowrap; /* Empêche le bouton de passer à la ligne */
}

#pyramide-word-input {
    flex: 1;
    min-width: 0; /* Permet au champ de diminuer si nécessaire */
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1.1em;
    transition: border-color 0.3s;
    box-sizing: border-box; /* Inclut padding et bordure dans la largeur */
}

#pyramide-word-input:focus {
    outline: none;
    border-color: #2196F3;
}

#pyramide-submit {
    margin-left: 10px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap; /* Empêche le texte du bouton de se couper */
    flex-shrink: 0; /* Empêche le bouton de rétrécir */
}

#pyramide-submit:hover {
    background-color: #1565C0;
}

.pyramide-messages {
    min-height: 60px;
    padding: 10px;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s;
}

.pyramide-messages.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 3px solid #c62828;
}

.pyramide-messages.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #2e7d32;
}

/* Statistiques */
.pyramide-stats {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pyramide-stats h3 {
    font-size: 1.4em;
    color: #3a3a3a;
    margin-bottom: 15px;
    text-align: center;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 10px 20px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    margin: 5px;
}

.stat-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #777;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #2196F3;
}

/* Modal de victoire */
.pyramide-victory {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.pyramide-victory.show {
    display: flex;
}

.victory-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.victory-content h2 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.victory-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

#share-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

#quit-button {
    background-color: red;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}


#share-button:hover {
    background-color: #388E3C;
}

/* Responsive */
@media (max-width: 768px) {
    .pyramide-container {
        flex-direction: column;
    }
    
    .pyramide-grid,
    .pyramide-interface {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .pyramide-cell {
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }
}
