/* ─── Sudo : bouton, bandeau, modal ──────────────────────────── */

.sudo-cache { display: none !important; }

/* Bouton "🔓 Activer mode admin" — à gauche du pseudo dans le H1 */
.btn-sudo {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: inherit;
    font-size: 0.85em;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    line-height: 1;
    vertical-align: middle;
    margin-right: 6px;
}
.btn-sudo:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.7);
    transform: scale(1.05);
}

/* Wrapper englobant le bandeau + nom_u quand mode admin actif */
.sudo-user-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: padding 0.2s;
    border-radius: 8px;
    vertical-align: middle;
}
.sudo-user-wrap.sudo-actif {
    background: linear-gradient(90deg, #ff8a00 0%, #ffae42 100%);
    box-shadow: 0 0 0 2px #ff8a00, 0 2px 8px rgba(255,138,0,0.4);
    padding: 3px 10px;
    animation: sudo-pulse 2s ease-in-out infinite;
}
.sudo-user-wrap.sudo-actif .nom_u {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
@keyframes sudo-pulse {
    0%, 100% { box-shadow: 0 0 0 2px #ff8a00, 0 2px 8px rgba(255,138,0,0.4); }
    50%      { box-shadow: 0 0 0 2px #ffb84d, 0 2px 12px rgba(255,138,0,0.7); }
}

/* Bandeau actif : icône + timer + boutons mini, à gauche du pseudo */
.sudo-bandeau {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 0.85em;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.sudo-bandeau .sudo-icone { font-size: 1.1em; }
.sudo-bandeau .sudo-timer {
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 56px;
    text-align: center;
}
.btn-sudo-mini {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95em;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.btn-sudo-mini:hover { background: rgba(255,255,255,0.45); }

/* ─── Modal d'activation / prolongation ───────────────────────── */
.sudo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sudo-modal-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 24px 28px;
    width: 480px;
    max-width: 92vw;
    color: #333;
}
.sudo-modal-card h3 {
    margin: 0 0 8px 0;
    color: #b8902a;
    font-size: 1.3em;
}
.sudo-modal-soustitre {
    margin: 0 0 18px 0;
    color: #666;
    font-size: 0.95em;
}
.sudo-form-group { margin-bottom: 16px; }
.sudo-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}
.sudo-form-group input[type=range] {
    width: 100%;
    accent-color: #ff8a00;
}
.sudo-duree-marqueurs {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.8em;
    margin-top: 4px;
}
.sudo-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
}
.sudo-form-group textarea:focus {
    outline: none;
    border-color: #ff8a00;
    box-shadow: 0 0 0 2px rgba(255,138,0,0.2);
}
.sudo-obligatoire {
    color: #999;
    font-weight: normal;
    font-size: 0.85em;
}
.sudo-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.sudo-btn-annuler, .sudo-btn-confirmer {
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.15s, transform 0.1s;
}
.sudo-btn-annuler {
    background: #eee;
    color: #555;
    border-color: #ccc;
}
.sudo-btn-annuler:hover { background: #ddd; }
.sudo-btn-confirmer {
    background: #ff8a00;
    color: #fff;
}
.sudo-btn-confirmer:hover { background: #e07700; }
.sudo-btn-confirmer:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.sudo-btn-confirmer.sudo-btn-danger {
    background: #d62828;
}
.sudo-btn-confirmer.sudo-btn-danger:hover { background: #b51e1e; }
.sudo-confirm-card { width: 420px; }
