/* 🌈 Couleurs principales */
:root {
    --primary: #f4a261;     /* orange doux */
    --secondary: #e76f51;   /* terracotta */
    --background: #fff7f0;  /* crème */
    --card: #ffffff;
    --text: #5a4a42;
    --green: #8ecae6;
    --red: #ff6b6b;
}

/* 🌍 Global */
body {
    background-color: var(--background);
    font-family: 'Segoe UI', sans-serif;
    color: var(--text);
}

/* 🧸 Titre */
h2, h3 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* ⏰ Horloge */
#clock {
    text-align: center;
    font-size: 20px;
    color: var(--text);
    margin-bottom: 20px;
}

/* 🔢 Clavier numérique */

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: auto;
    padding: 10px;
}
/* 🔘 Boutons */
.key {
    font-size: 26px;
    padding: 20px;
    border-radius: 20px;
    border: none;
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transition: 0.15s;
}

/* 🎯 Effet appui */
.key:active {
    transform: scale(0.95);
    background: var(--secondary);
}

/* 🧹 Bouton clear */
.key.btn-warning {
    background: #ffd166;
    color: #333;
}

/* ✅ Bouton OK */
.key.btn-success {
    background: #90be6d;
}

/* 🔢 Affichage code */
#display {
    font-size: 36px;
    text-align: center;
    letter-spacing: 12px;
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin: 20px auto;
    width: 200px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* 📩 Message */
#message {
    text-align: center;
    font-size: 18px;
    margin-top: 15px;
    font-weight: bold;
}

/* 📊 Tableaux */
table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}

table th {
    background: var(--primary);
    color: white;
    padding: 12px;
}

table td {
    padding: 10px;
}

table tr:nth-child(even) {
    background: #fff3e6;
}

table tr:hover {
    background: #ffe0cc;
}

/* 🧾 Formulaire */
input {
    border-radius: 10px !important;
    padding: 10px;
    border: 1px solid #ddd;
}

button {
    border-radius: 12px !important;
}

/* 📱 Responsive */
@media (max-width: 600px) {
    .key {
        font-size: 20px;
        padding: 15px;
    }

    #display {
        font-size: 28px;
    }
}

/* ⚙️ Bouton admin (coin bas droite) */
.admin-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #e76f51;
    color: white;
    font-size: 24px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.2s;
}

/* Effet hover */
.admin-btn:hover {
    background: #d65a3b;
    transform: scale(1.1);
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #f4a261;
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: 0.2s;
}

/* Hover */
.back-btn:hover {
    background: #e76f51;
    transform: translateX(-3px);
}