:root {
    --bg: #0b0b0c;
    --panel: #161617;
    --accent: #61dafb;
    --accent-2: #a855f7;
    --text: #ffffff;
    --muted: #9aa0a6;
    --danger: #ff4b2b;
    --radius: 16px;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* --- ÉCRAN DE VERROUILLAGE --- */
#lockScreen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lock-card {
    background: var(--panel);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 320px;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
}

input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 20px 0;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    box-sizing: border-box;
}

/* --- INTERFACE ADMIN --- */
header {
    padding: 1px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accent-text {
    color: var(--accent);
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 1px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- STRUCTURE DES BOITES --- */
.box {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 0;
    /* On enlève le padding pour que le titre colle en haut */
    height: 67vh;
    display: flex;
    flex-direction: column;
    /* Aligne titre puis liste verticalement */
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    /* Empêche la boite entière de scroller */
}

.cky-btn-revisit-wrapper {
  /*      left: auto !important;*/
    bottom: 70px !important;
    left : 20px !important;
}

.box h2 {
    padding: 20px;
    margin: 0;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.2rem;
    color: var(--accent);
    text-align: center;
}

.search-container {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#searchBar {
    width: 100%;
    padding: 10px 15px;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#searchBar:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(97, 218, 251, 0.2);
}

/* On ajuste un peu le h2 pour qu'il n'y ait pas de bordure en bas, car c'est la barre de recherche qui la fait maintenant */
.box h2 {
    border-bottom: none !important;
}

.box::-webkit-scrollbar {
    width: 6px;
}

.box::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* --- BOUTONS --- */
button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-main {
    background: var(--accent);
    color: #000;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(97, 218, 251, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    border: 1px solid #333;
    margin:10px;
}

.btn-secondary:hover {
    background: #333;
    color: white;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(0, 0, 0, 0.3);
    position: sticky;
    bottom: 0;
}

.center-actions {
    display: flex;
    gap: 15px;
}

/* --- LA LISTE QUI SCROLLE SEULE --- */
ul {
    list-style: none;
    /* ENLÈVE LES POINTS/PUCES */
    padding: 15px;
    margin: 0;
    flex: 1;
    /* Prend toute la place restante */
    overflow-y: auto;
    /* Seule la liste défile */
}

/* --- STYLE DES ÉLÉMENTS --- */
li {
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

li:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Sélectionné (Vert Josy) */
li.selected {
    background-color: rgba(76, 175, 80, 0.2) !important;
    border: 1px solid #4CAF50 !important;
    color: #4CAF50 !important;
}

/* Scrollbar personnalisée pour la liste */
ul::-webkit-scrollbar {
    width: 6px;
}

ul::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* --- État grisé pour les boutons --- */
button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
    /* Rend le bouton gris */
    transform: none !important;
    /* Annule l'effet de survol */
    box-shadow: none !important;
}

.container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap; /* Garde les colonnes côte à côte */
    overflow-x: auto;  /* Permet de scroller si l'écran est petit */
}

.box {
    flex: 1;
    /*min-width: 300px; /* Taille minimum pour chaque colonne */
    max-width: 400px;
}